summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_readFile.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-01-25 23:51:29 +0100
committerGitHub <noreply@github.com>2024-01-25 23:51:29 +0100
commit0b0fb94ce2489da642cffd82e0498446d4a1fe1f (patch)
treeaf3fd4fd60e0e9fdf5301ac2881b8e5c43f25cbb /ext/node/polyfills/_fs/_fs_readFile.ts
parent7038074c8583465872b16083f54f2211312f0943 (diff)
fix(fs): instanceof check for Deno.FsFile (#22121)
Regression caused by https://github.com/denoland/deno/pull/22072. I added a relevant test so we don't regress again. Fixes https://github.com/denoland/deno/issues/22115
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_readFile.ts')
-rw-r--r--ext/node/polyfills/_fs/_fs_readFile.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/_fs/_fs_readFile.ts b/ext/node/polyfills/_fs/_fs_readFile.ts
index de1a2a30d..0f05ee167 100644
--- a/ext/node/polyfills/_fs/_fs_readFile.ts
+++ b/ext/node/polyfills/_fs/_fs_readFile.ts
@@ -73,7 +73,7 @@ export function readFile(
let p: Promise<Uint8Array>;
if (path instanceof FileHandle) {
- const fsFile = new FsFile(path.fd);
+ const fsFile = new FsFile(path.fd, Symbol.for("Deno.internal.FsFile"));
p = readAll(fsFile);
} else {
p = Deno.readFile(path);