diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/fs/streams.js | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index 501c9ee4d2..7174990ebb 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -243,13 +243,7 @@ function WriteStream(path, options) { this.closed = false; if (this.start !== undefined) { - if (typeof this.start !== 'number') { - throw new ERR_INVALID_ARG_TYPE('start', 'number', this.start); - } - if (this.start < 0) { - const errVal = `{start: ${this.start}}`; - throw new ERR_OUT_OF_RANGE('start', '>= 0', errVal); - } + checkPosition(this.start, 'start'); this.pos = this.start; } |