aboutsummaryrefslogtreecommitdiff
path: root/lib/internal/fs/read_file_context.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/fs/read_file_context.js')
-rw-r--r--lib/internal/fs/read_file_context.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/internal/fs/read_file_context.js b/lib/internal/fs/read_file_context.js
index e1de8fc7cd..d7b0e36800 100644
--- a/lib/internal/fs/read_file_context.js
+++ b/lib/internal/fs/read_file_context.js
@@ -1,6 +1,8 @@
'use strict';
-const { Math } = primordials;
+const {
+ MathMin,
+} = primordials;
const { Buffer } = require('buffer');
@@ -87,7 +89,7 @@ class ReadFileContext {
} else {
buffer = this.buffer;
offset = this.pos;
- length = Math.min(kReadFileBufferLength, this.size - this.pos);
+ length = MathMin(kReadFileBufferLength, this.size - this.pos);
}
const req = new FSReqCallback();