summaryrefslogtreecommitdiff
path: root/std/node/module.ts
diff options
context:
space:
mode:
authorNikolai Vavilov <vvnicholas@gmail.com>2020-03-19 16:42:07 +0200
committerGitHub <noreply@github.com>2020-03-19 10:42:07 -0400
commit8c1c929034d46101b6a51ec5cf5e2f307ed0c271 (patch)
treee86383fb34829d991121fc3203595d7e77327779 /std/node/module.ts
parent74c37e759ac03267975309c1425223289ebc925f (diff)
fix: stack traces for modules imported via std/node's require (#4035)
Diffstat (limited to 'std/node/module.ts')
-rw-r--r--std/node/module.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/node/module.ts b/std/node/module.ts
index 01f1f0477..21992f743 100644
--- a/std/node/module.ts
+++ b/std/node/module.ts
@@ -1045,11 +1045,11 @@ type RequireWrapper = (
__dirname: string
) => void;
-function wrapSafe(filename_: string, content: string): RequireWrapper {
+function wrapSafe(filename: string, content: string): RequireWrapper {
// TODO: fix this
const wrapper = Module.wrap(content);
// @ts-ignore
- const [f, err] = Deno.core.evalContext(wrapper);
+ const [f, err] = Deno.core.evalContext(wrapper, filename);
if (err) {
throw err;
}