Skip to content

Commit

Permalink
fs: fd parameter check - change of comparison type to include undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanelliott27 committed Nov 10, 2020
1 parent 895b908 commit 14e8a18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function ReadStream(path, options) {
}

// If fd has been set, validate, otherwise validate path.
if (this.fd !== null) {
if (this.fd != null) {
validateInteger(this.fd, 'fd', 0);
} else {
validatePath(this.path);
Expand Down Expand Up @@ -305,7 +305,7 @@ function WriteStream(path, options) {
this[kIsPerformingIO] = false;

// If fd has been set, validate, otherwise validate path.
if (this.fd !== null) {
if (this.fd != null) {
validateInteger(this.fd, 'fd', 0);
} else {
validatePath(this.path);
Expand Down

0 comments on commit 14e8a18

Please sign in to comment.