Skip to content

Commit 077317b

Browse files
committed
fix: check partial nodes based on name's annotation
1 parent f4b29d9 commit 077317b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/process/src/transformer.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ function flatten_node(node: Node): [NodeType[], string[], string[]] {
8181
// returns nodes, tags and partials
8282
const aux_create_state = (node: Node): [NodeType[], string[], string[]] =>
8383
is_partial_node(node)
84-
? [[], [], node.annotations[0].value] // first elem is the partial file's name others are the meta data, like passed-in vars
84+
? [
85+
[],
86+
[],
87+
node.annotations
88+
.filter((a) => a.name == 'file')
89+
.map((node) => node.value),
90+
]
8591
: node.tag
8692
? [[], [node.tag], []]
8793
: [[node.type], [], []];

0 commit comments

Comments
 (0)