diff options
Diffstat (limited to 'ext/fs/30_fs.js')
-rw-r--r-- | ext/fs/30_fs.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js index 35a9d304b..ea89feda1 100644 --- a/ext/fs/30_fs.js +++ b/ext/fs/30_fs.js @@ -83,6 +83,7 @@ const { Function, MathTrunc, ObjectEntries, + ObjectDefineProperty, ObjectPrototypeIsPrototypeOf, ObjectValues, StringPrototypeSlice, @@ -656,14 +657,16 @@ function create(path) { } class FsFile { - [internalRidSymbol] = 0; #rid = 0; #readable; #writable; constructor(rid, symbol) { - this[internalRidSymbol] = rid; + ObjectDefineProperty(this, internalRidSymbol, { + enumerable: false, + value: rid, + }); this.#rid = rid; if (!symbol || symbol !== SymbolFor("Deno.internal.FsFile")) { internals.warnOnDeprecatedApi( |