diff options
author | sigmaSd <bedisnbiba@gmail.com> | 2023-10-22 09:02:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 08:02:55 +0000 |
commit | 9f9c3d9048108200a888c508328d2a19cbbd6164 (patch) | |
tree | 664847bcef81d34a26d5371378d460b61245eac3 /ext/node/polyfills/_fs/_fs_common.ts | |
parent | fb73eb1e9dca3e93cc7efcf5c2244e0068733843 (diff) |
fix(polyfill): correctly handle flag when its equal 0 (#20953)
Fixes https://github.com/denoland/deno/issues/20910
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_common.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_common.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/_fs/_fs_common.ts b/ext/node/polyfills/_fs/_fs_common.ts index d1dfabc4f..3817ee9f8 100644 --- a/ext/node/polyfills/_fs/_fs_common.ts +++ b/ext/node/polyfills/_fs/_fs_common.ts @@ -108,7 +108,7 @@ export function checkEncoding(encoding: Encodings | null): Encodings | null { export function getOpenOptions( flag: string | number | undefined, ): Deno.OpenOptions { - if (!flag) { + if (flag === undefined) { return { create: true, append: true }; } |