summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_read.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_read.ts')
-rw-r--r--ext/node/polyfills/_fs/_fs_read.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/_fs/_fs_read.ts b/ext/node/polyfills/_fs/_fs_read.ts
index dec3a8bbd..df4f5e375 100644
--- a/ext/node/polyfills/_fs/_fs_read.ts
+++ b/ext/node/polyfills/_fs/_fs_read.ts
@@ -173,7 +173,7 @@ export function readSync(
validateBuffer(buffer);
if (length == null) {
- length = 0;
+ length = buffer.byteLength;
}
if (typeof offsetOrOpt === "number") {