Skip to content

Commit

Permalink
use Object.setPrototypeOf instead of __proto__
Browse files Browse the repository at this point in the history
  • Loading branch information
vixalien committed Aug 14, 2023
1 parent 8b9d84e commit b9b1ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cache/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module.exports = class FSCache {

static fromJSON(key, val) {
if (val && val.__type) {
val.__proto__ = nodes[val.__type].prototype;
Object.setPrototypeOf(val, nodes[val.__type].prototype);
}
return val;
};
Expand Down

0 comments on commit b9b1ee7

Please sign in to comment.