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> = {
448448 } else if ( hasSetupBinding ( setupState , key ) ) {
449449 accessCache ! [ key ] = AccessTypes . SETUP
450450 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+ ) {
452456 accessCache ! [ key ] = AccessTypes . DATA
453457 return data [ key ]
454458 } else if (
@@ -545,7 +549,11 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
545549 ) {
546550 warn ( `Cannot mutate <script setup> binding "${ key } " from Options API.` )
547551 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+ ) {
549557 data [ key ] = value
550558 return true
551559 } else if ( hasOwn ( instance . props , key ) ) {
@@ -582,7 +590,10 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
582590 let normalizedProps , cssModules
583591 return ! ! (
584592 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 ) ) ||
586597 hasSetupBinding ( setupState , key ) ||
587598 ( ( normalizedProps = propsOptions [ 0 ] ) && hasOwn ( normalizedProps , key ) ) ||
588599 hasOwn ( ctx , key ) ||
You can’t perform that action at this time.
0 commit comments