Explorar el Código

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

Austin Keener hace 4 años
padre
commit
f3e15f633e
Se han modificado 1 ficheros con 3 adiciones y 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 ` +