diff --git a/ext/node/polyfills/internal/fs/handle.ts b/ext/node/polyfills/internal/fs/handle.ts index 0f0e8f19df0af8..9e58a86dd2c9b8 100644 --- a/ext/node/polyfills/internal/fs/handle.ts +++ b/ext/node/polyfills/internal/fs/handle.ts @@ -148,7 +148,7 @@ export class FileHandle extends EventEmitter { stat(options: { bigint: false }): Promise; stat(options: { bigint: true }): Promise; stat(options?: { bigint: boolean }): Promise { - return promises.fstat(this.fd, options); + return fsCall(promises.fstat, this, options); } } @@ -161,7 +161,7 @@ function fsCall(fn, handle, ...args) { }); } - return fn(handle, ...args); + return fn(handle.fd, ...args); } export default {