fix(compiler-vapor): SET_REF operation should be registered last (#159)

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
Jevon 2024-03-22 23:33:55 +08:00 committed by GitHub
parent 9a2c12e3cd
commit ed6b1718d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -22,10 +22,10 @@ export const transformRef: NodeTransform = (node, context) => {
? createSimpleExpression(dir.value.content, true, dir.value.loc)
: EMPTY_EXPRESSION
}
context.registerOperation({
type: IRNodeTypes.SET_REF,
element: context.reference(),
value,
})
return () =>
context.registerOperation({
type: IRNodeTypes.SET_REF,
element: context.reference(),
value,
})
}