Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Darshan Sen <[email protected]>
  • Loading branch information
aduh95 and RaisinTen authored Mar 19, 2021
1 parent 14e8a18 commit ed8b083
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { Buffer } = require('buffer');
const {
copyObject,
getOptions,
validatePath
validatePath,
} = require('internal/fs/utils');
const { Readable, Writable, finished } = require('stream');
const { toPathIfFileURL } = require('internal/url');
Expand Down Expand Up @@ -134,7 +134,7 @@ function ReadStream(path, options) {

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

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

0 comments on commit ed8b083

Please sign in to comment.