diff options
Diffstat (limited to 'lib/_stream_readable.js')
-rw-r--r-- | lib/_stream_readable.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 7c9a14f439..0d83ada205 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -23,6 +23,8 @@ const { ArrayIsArray, + NumberIsInteger, + NumberIsNaN, ObjectDefineProperty, ObjectSetPrototypeOf, } = primordials; @@ -406,7 +408,7 @@ function howMuchToRead(n, state) { return 0; if (state.objectMode) return 1; - if (Number.isNaN(n)) { + if (NumberIsNaN(n)) { // Only flow one buffer at a time if (state.flowing && state.length) return state.buffer.first().length; @@ -425,7 +427,7 @@ Readable.prototype.read = function(n) { // in this scenario, so we are doing it manually. if (n === undefined) { n = NaN; - } else if (!Number.isInteger(n)) { + } else if (!NumberIsInteger(n)) { n = parseInt(n, 10); } const state = this._readableState; |