diff options
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_read.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_read.ts | 2 |
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 6d7efbeef..66d5a4093 100644 --- a/ext/node/polyfills/_fs/_fs_read.ts +++ b/ext/node/polyfills/_fs/_fs_read.ts @@ -167,7 +167,7 @@ export function readSync( if (typeof offsetOrOpt === "number") { offset = offsetOrOpt; validateInteger(offset, "offset", 0); - } else { + } else if (offsetOrOpt !== undefined) { const opt = offsetOrOpt as readSyncOptions; offset = opt.offset ?? 0; length = opt.length ?? buffer.byteLength; |