From b8aab3d2097db7c447da0ecc2e36784ba23febde Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Wed, 5 Nov 2025 09:04:55 +0000 Subject: [PATCH] refactor(runtime-core): check feature flag when forwarding `data` properties (#13966) --- .../runtime-core/src/componentPublicInstance.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts index 58c18764ee..57d784c0e0 100644 --- a/packages/runtime-core/src/componentPublicInstance.ts +++ b/packages/runtime-core/src/componentPublicInstance.ts @@ -448,7 +448,11 @@ export const PublicInstanceProxyHandlers: ProxyHandler = { } else if (hasSetupBinding(setupState, key)) { accessCache![key] = AccessTypes.SETUP return setupState[key] - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + } else if ( + __FEATURE_OPTIONS_API__ && + data !== EMPTY_OBJ && + hasOwn(data, key) + ) { accessCache![key] = AccessTypes.DATA return data[key] } else if ( @@ -545,7 +549,11 @@ export const PublicInstanceProxyHandlers: ProxyHandler = { ) { warn(`Cannot mutate