chore: update

This commit is contained in:
yangchangtao 2024-08-21 16:34:26 +08:00
parent 70b5671fba
commit 7704d78a34
1 changed files with 4 additions and 3 deletions

View File

@ -87,11 +87,12 @@ function analyzeBindingsFromOptions(node: ObjectExpression): BindingMetadata {
bodyItem.argument.type === 'ObjectExpression' bodyItem.argument.type === 'ObjectExpression'
) { ) {
for (const key of getObjectExpressionKeys(bodyItem.argument)) { for (const key of getObjectExpressionKeys(bodyItem.argument)) {
bindings[key] = !bindings[key] // use variables in setup first, consistent with runtime
? property.key.name === 'setup' if (bindings[key] === BindingTypes.SETUP_MAYBE_REF) continue
bindings[key] =
property.key.name === 'setup'
? BindingTypes.SETUP_MAYBE_REF ? BindingTypes.SETUP_MAYBE_REF
: BindingTypes.DATA : BindingTypes.DATA
: BindingTypes.SETUP_MAYBE_REF
} }
} }
} }