Skip to content

Commit

Permalink
Make toString property writable, configurable, and enumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
jportner committed Mar 11, 2023
1 parent 6f40a78 commit 1a14441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source-map-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ function cloneCallSite(frame) {
// cannot have the property changed using an assignment. If using strict mode, attempting that will cause an error. If not using strict
// mode, attempting that will be silently ignored.
// However, we can still explicitly shadow the prototype's "toString" property by defining a new "toString" property on this object.
Object.defineProperty(object, 'toString', { value: CallSiteToString });
Object.defineProperty(object, 'toString', { value: CallSiteToString, writable: true, enumerable: true, configurable: true });

return object;
}
Expand Down

0 comments on commit 1a14441

Please sign in to comment.