diff --git a/lib/internal/freeze_intrinsics.js b/lib/internal/freeze_intrinsics.js index 60fff67f2e100c..dc64c13409b2f1 100644 --- a/lib/internal/freeze_intrinsics.js +++ b/lib/internal/freeze_intrinsics.js @@ -384,8 +384,8 @@ module.exports = function() { defineProperty(this, prop, { value: newValue, writable: true, - enumerable: desc.enumerable, - configurable: desc.configurable + enumerable: true, + configurable: true }); } } diff --git a/test/parallel/test-freeze-intrinsics.js b/test/parallel/test-freeze-intrinsics.js index 0cae3167f9eaeb..2e9ff5f4fe2fdc 100644 --- a/test/parallel/test-freeze-intrinsics.js +++ b/test/parallel/test-freeze-intrinsics.js @@ -27,4 +27,6 @@ assert.throws( const o = {}; o.toString = () => 'Custom toString'; assert.strictEqual(o + 'asdf', 'Custom toStringasdf'); + assert.strictEqual(Object.getOwnPropertyDescriptor(o, 'toString').enumerable, + true); }