Skip to content

Commit c54072b

Browse files
fix: use Metadata first
1 parent 831e180 commit c54072b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/compiler-core/src/transforms/transformExpression.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ export function processExpression(
227227
const isScopeVarReference = context.identifiers[rawExp]
228228
const isAllowedGlobal = isGloballyAllowed(rawExp)
229229
const isLiteral = isLiteralWhitelisted(rawExp)
230-
if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) {
230+
231+
if (
232+
(!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) ||
233+
bindingMetadata[rawExp]
234+
) {
231235
// const bindings exposed from setup can be skipped for patching but
232236
// cannot be hoisted to module scope
233237
if (isConst(bindingMetadata[node.content])) {

0 commit comments

Comments
 (0)