Skip to content

Commit 9a392a6

Browse files
author
Ives van Hoorne
committed
Delete cache of relevant modules from error
1 parent f63058b commit 9a392a6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sandbox/eval/js/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ export default function evaluateJS(
157157
moduleCache,
158158
requires,
159159
);
160+
161+
if (newError.module && newError.module !== e.module) {
162+
deleteCache(newError.module);
163+
}
164+
160165
throw newError;
161166
}
162167
}

0 commit comments

Comments
 (0)