Skip to content

Commit db78cb6

Browse files
committed
fix: use node.forParseResult if present
1 parent e8730c2 commit db78cb6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/utils/template.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,15 @@ function handleNode(
109109
}
110110
case NodeTypes.DIRECTIVE: {
111111
const nodes = [
112-
node.exp,
112+
...node.forParseResult
113+
? [
114+
node.forParseResult?.source,
115+
node.forParseResult?.value,
116+
node.forParseResult?.key,
117+
node.forParseResult?.index,
118+
]
119+
: [node.exp],
113120
// node.arg,
114-
// node.forParseResult?.source,
115-
// node.forParseResult?.value,
116-
// node.forParseResult?.key,
117-
// node.forParseResult?.index,
118121
...node.modifiers,
119122
].filter(item => !!item)
120123
for (const child of nodes) {

0 commit comments

Comments
 (0)