Explorar o código

fix(compat): fix props check for v-model compat warning (#4056)

Austin Keener %!s(int64=4) %!d(string=hai) anos
pai
achega
f3e15f633e
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      packages/runtime-core/src/compat/compatConfig.ts

+ 3 - 2
packages/runtime-core/src/compat/compatConfig.ts

@@ -398,9 +398,10 @@ export const deprecationData: Record<DeprecationTypes, DeprecationData> = {
           DeprecationTypes.COMPONENT_V_MODEL
         }: false }\`.`
       if (
-        comp.props && isArray(comp.props)
+        comp.props &&
+        (isArray(comp.props)
           ? comp.props.includes('modelValue')
-          : hasOwn(comp.props, 'modelValue')
+          : hasOwn(comp.props, 'modelValue'))
       ) {
         return (
           `Component delcares "modelValue" prop, which is Vue 3 usage, but ` +