diff options
Diffstat (limited to 'lib/internal/streams/state.js')
-rw-r--r-- | lib/internal/streams/state.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/internal/streams/state.js b/lib/internal/streams/state.js index a3f5e67286..aa16a0a6b8 100644 --- a/lib/internal/streams/state.js +++ b/lib/internal/streams/state.js @@ -1,6 +1,8 @@ 'use strict'; -const { Math } = primordials; +const { + MathFloor, +} = primordials; const { ERR_INVALID_OPT_VALUE } = require('internal/errors').codes; @@ -20,7 +22,7 @@ function getHighWaterMark(state, options, duplexKey, isDuplex) { const name = isDuplex ? duplexKey : 'highWaterMark'; throw new ERR_INVALID_OPT_VALUE(name, hwm); } - return Math.floor(hwm); + return MathFloor(hwm); } // Default value |