aboutsummaryrefslogtreecommitdiff
path: root/test/sandbox.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-28 23:13:49 +0000
committerGitHub <noreply@github.com>2021-03-01 07:13:49 +0800
commitec0440f26492ff548a670605f232de8e14a93390 (patch)
treeab33d0e2cf42e16687c2b668a086752aaffcefd9 /test/sandbox.js
parent81254f67e473f2a1db8341de26cd923f9c592e17 (diff)
downloadtracifyjs-ec0440f26492ff548a670605f232de8e14a93390.tar.gz
tracifyjs-ec0440f26492ff548a670605f232de8e14a93390.zip
fix corner cases with `import` (#4709)
fixes #4708
Diffstat (limited to 'test/sandbox.js')
-rw-r--r--test/sandbox.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sandbox.js b/test/sandbox.js
index b2b5e00c..bdce4188 100644
--- a/test/sandbox.js
+++ b/test/sandbox.js
@@ -61,7 +61,7 @@ exports.patch_module_statements = function(code) {
symbols = symbols.replace(/[{}]/g, "").trim().replace(/\s*,\s*/g, ",");
symbols = symbols.replace(/\*/, '"*"').replace(/\bas\s+(?!$|,|as\s)/g, ":");
imports.push([
- "var {",
+ "const {",
symbols,
"} = new Proxy(Object.create(null), { get(_, value) { return { value }; } });",
].join(""));