marko 6.0.34 → 6.0.36
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/translator/index.js +12 -4
- package/package.json +1 -1
package/dist/translator/index.js
CHANGED
@@ -797,7 +797,6 @@ function getExprRoot(path5) {
|
|
797
797
|
function getFnRoot(path5) {
|
798
798
|
let curPath = path5;
|
799
799
|
let fnPath;
|
800
|
-
if (curPath.isProgram()) return;
|
801
800
|
while (!isMarko(curPath)) {
|
802
801
|
if (isFunction(curPath)) {
|
803
802
|
fnPath = curPath;
|
@@ -809,7 +808,12 @@ function getFnRoot(path5) {
|
|
809
808
|
break;
|
810
809
|
}
|
811
810
|
}
|
812
|
-
|
811
|
+
const parentPath = curPath.parentPath;
|
812
|
+
if (parentPath) {
|
813
|
+
curPath = parentPath;
|
814
|
+
} else {
|
815
|
+
break;
|
816
|
+
}
|
813
817
|
}
|
814
818
|
return fnPath;
|
815
819
|
}
|
@@ -4474,8 +4478,12 @@ function createBinding(name2, type, section, upstreamAlias, property, excludePro
|
|
4474
4478
|
function trackVarReferences(tag, type, upstreamAlias) {
|
4475
4479
|
const tagVar = tag.node.var;
|
4476
4480
|
if (tagVar) {
|
4477
|
-
|
4481
|
+
let canonicalUpstreamAlias = getCanonicalBinding(upstreamAlias);
|
4478
4482
|
if (canonicalUpstreamAlias) {
|
4483
|
+
const { excludeProperties } = canonicalUpstreamAlias;
|
4484
|
+
if (excludeProperties !== void 0) {
|
4485
|
+
canonicalUpstreamAlias = canonicalUpstreamAlias.upstreamAlias;
|
4486
|
+
}
|
4479
4487
|
createBindingsAndTrackReferences(
|
4480
4488
|
tagVar,
|
4481
4489
|
canonicalUpstreamAlias.type,
|
@@ -4483,7 +4491,7 @@ function trackVarReferences(tag, type, upstreamAlias) {
|
|
4483
4491
|
canonicalUpstreamAlias.section,
|
4484
4492
|
canonicalUpstreamAlias,
|
4485
4493
|
void 0,
|
4486
|
-
|
4494
|
+
excludeProperties
|
4487
4495
|
);
|
4488
4496
|
return canonicalUpstreamAlias;
|
4489
4497
|
}
|