Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Molinaro authored Aug 14, 2021
1 parent 9a44fa4 commit 5d45b21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jest-resolve/src/defaultResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function statSyncCached(path: string): IPathType {
}

let stat;
const oldTrace = Object.getOwnPropertyDescriptors(Error).stackTraceLimit;
const oldTrace = { ...Object.getOwnPropertyDescriptors(Error).stackTraceLimit };
try {
Object.defineProperty(Error, 'stackTraceLimit', {
value: 0,
Expand All @@ -90,7 +90,7 @@ function statSyncCached(path: string): IPathType {
throw e;
}
} finally {
Object.defineProperty(Error, 'stackTraceLimit', oldTrace);
// Object.defineProperty(Error, 'stackTraceLimit', oldTrace);
}

if (stat) {
Expand Down

0 comments on commit 5d45b21

Please sign in to comment.