@zessjs/compiler 1.0.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler.cjs +1 -1
- package/dist/compiler.js +1 -1
- package/package.json +1 -1
package/dist/compiler.cjs
CHANGED
|
@@ -644,7 +644,7 @@ function transformThisExpression(node) {
|
|
|
644
644
|
currentContext.hasThisInProgram = true;
|
|
645
645
|
for (let i = 0; i < body.length; ++i) {
|
|
646
646
|
if (body[i].type === "ImportDeclaration") continue;
|
|
647
|
-
body.splice(i, 0, createVariableDeclaration(thisId,
|
|
647
|
+
body.splice(i, 0, createVariableDeclaration(thisId, createIdentifier("globalThis", programPosition), programPosition));
|
|
648
648
|
break;
|
|
649
649
|
}
|
|
650
650
|
} else if (!currentContext.hasThisInFunction) {
|
package/dist/compiler.js
CHANGED
|
@@ -616,7 +616,7 @@ function transformThisExpression(node) {
|
|
|
616
616
|
currentContext.hasThisInProgram = true;
|
|
617
617
|
for (let i = 0; i < body.length; ++i) {
|
|
618
618
|
if (body[i].type === "ImportDeclaration") continue;
|
|
619
|
-
body.splice(i, 0, createVariableDeclaration(thisId,
|
|
619
|
+
body.splice(i, 0, createVariableDeclaration(thisId, createIdentifier("globalThis", programPosition), programPosition));
|
|
620
620
|
break;
|
|
621
621
|
}
|
|
622
622
|
} else if (!currentContext.hasThisInFunction) {
|