Skip to content

Commit

Permalink
fix: use Metadata first
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Skyblue committed Oct 27, 2023
1 parent 831e180 commit c54072b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/compiler-core/src/transforms/transformExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ export function processExpression(
const isScopeVarReference = context.identifiers[rawExp]
const isAllowedGlobal = isGloballyAllowed(rawExp)
const isLiteral = isLiteralWhitelisted(rawExp)
if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) {

if (
(!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) ||
bindingMetadata[rawExp]
) {
// const bindings exposed from setup can be skipped for patching but
// cannot be hoisted to module scope
if (isConst(bindingMetadata[node.content])) {
Expand Down

0 comments on commit c54072b

Please sign in to comment.