// is the multiple hasOwn() calls. It's much faster to do a simple property
// access on a plain object, so we use an accessCache object (with null
// prototype) to memoize what access type a key corresponds to.
- let normalizedProps
if (key[0] !== '$') {
const n = accessCache![key]
if (n !== undefined) {
) {
accessCache![key] = AccessTypes.DATA
return data[key]
- } else if (
- // only cache other properties when instance has declared (thus stable)
- // props
- (normalizedProps = instance.propsOptions[0]) &&
- hasOwn(normalizedProps, key)
- ) {
+ } else if (hasOwn(props, key)) {
accessCache![key] = AccessTypes.PROPS
return props![key]
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
has(
{
- _: { data, setupState, accessCache, ctx, appContext, propsOptions, type },
+ _: { data, setupState, accessCache, ctx, appContext, props, type },
}: ComponentRenderContext,
key: string,
) {
- let normalizedProps, cssModules
+ let cssModules
return !!(
accessCache![key] ||
(__FEATURE_OPTIONS_API__ &&
key[0] !== '$' &&
hasOwn(data, key)) ||
hasSetupBinding(setupState, key) ||
- ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
+ hasOwn(props, key) ||
hasOwn(ctx, key) ||
hasOwn(publicPropertiesMap, key) ||
hasOwn(appContext.config.globalProperties, key) ||