Skip to content

Commit

Permalink
Review comments: add configurable
Browse files Browse the repository at this point in the history
PR-URL: #71
Credit: @erights
Close: #71
Reviewed-by: @ljharb
  • Loading branch information
erights authored and isaacs committed Nov 8, 2022
1 parent d5db5ee commit 0e170d3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ class StackUtils {
setFile(res, site.getFileName(), this._cwd);

if (site.isConstructor()) {
Object.defineProperty(res, 'constructor', { value: true });
Object.defineProperty(res, 'constructor', {
value: true,
configurable: true,
});
}

if (site.isEval()) {
Expand Down Expand Up @@ -260,7 +263,10 @@ class StackUtils {
setFile(res, file, this._cwd);

if (ctor) {
Object.defineProperty(res, 'constructor', { value: true });
Object.defineProperty(res, 'constructor', {
value: true,
configurable: true,
});
}

if (evalOrigin) {
Expand Down

0 comments on commit 0e170d3

Please sign in to comment.