File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,11 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
448
448
} else if ( hasSetupBinding ( setupState , key ) ) {
449
449
accessCache ! [ key ] = AccessTypes . SETUP
450
450
return setupState [ key ]
451
- } else if ( data !== EMPTY_OBJ && hasOwn ( data , key ) ) {
451
+ } else if (
452
+ __FEATURE_OPTIONS_API__ &&
453
+ data !== EMPTY_OBJ &&
454
+ hasOwn ( data , key )
455
+ ) {
452
456
accessCache ! [ key ] = AccessTypes . DATA
453
457
return data [ key ]
454
458
} else if (
@@ -545,7 +549,11 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
545
549
) {
546
550
warn ( `Cannot mutate <script setup> binding "${ key } " from Options API.` )
547
551
return false
548
- } else if ( data !== EMPTY_OBJ && hasOwn ( data , key ) ) {
552
+ } else if (
553
+ __FEATURE_OPTIONS_API__ &&
554
+ data !== EMPTY_OBJ &&
555
+ hasOwn ( data , key )
556
+ ) {
549
557
data [ key ] = value
550
558
return true
551
559
} else if ( hasOwn ( instance . props , key ) ) {
@@ -582,7 +590,10 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
582
590
let normalizedProps , cssModules
583
591
return ! ! (
584
592
accessCache ! [ key ] ||
585
- ( data !== EMPTY_OBJ && key [ 0 ] !== '$' && hasOwn ( data , key ) ) ||
593
+ ( __FEATURE_OPTIONS_API__ &&
594
+ data !== EMPTY_OBJ &&
595
+ key [ 0 ] !== '$' &&
596
+ hasOwn ( data , key ) ) ||
586
597
hasSetupBinding ( setupState , key ) ||
587
598
( ( normalizedProps = propsOptions [ 0 ] ) && hasOwn ( normalizedProps , key ) ) ||
588
599
hasOwn ( ctx , key ) ||
You can’t perform that action at this time.
0 commit comments