marko 6.1.4 → 6.1.5
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 +1 -1
- package/package.json +1 -1
package/dist/translator/index.js
CHANGED
|
@@ -7956,7 +7956,7 @@ var import_declaration_default = {
|
|
|
7956
7956
|
const tags = importDecl.hub.file.metadata.marko.tags;
|
|
7957
7957
|
if (!tags.includes(tagImport)) tags.push(tagImport);
|
|
7958
7958
|
}
|
|
7959
|
-
const loadAttrValuePath = importDecl.get("attributes").find((p) => (p.node.key.type === "Identifier" ? p.node.key.name : p.node.key.value) === "load")?.get("value");
|
|
7959
|
+
const loadAttrValuePath = node.attributes?.length && importDecl.get("attributes").find((p) => (p.node.key.type === "Identifier" ? p.node.key.name : p.node.key.value) === "load")?.get("value");
|
|
7960
7960
|
if (loadAttrValuePath) {
|
|
7961
7961
|
(node.extra ??= {}).loadImport = getLoadImportConfig(loadAttrValuePath);
|
|
7962
7962
|
const { file } = importDecl.hub;
|