]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compat): fix props check for v-model compat warning (#4056)
authorAustin Keener <keeneraustin@yahoo.com>
Sun, 4 Jul 2021 22:32:44 +0000 (18:32 -0400)
committerGitHub <noreply@github.com>
Sun, 4 Jul 2021 22:32:44 +0000 (18:32 -0400)
packages/runtime-core/src/compat/compatConfig.ts

index a6ab9854bbe2f00117389c182304490469c7a71a..05ecc3e72ea030d90ff2421828724757f92ce85c 100644 (file)
@@ -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 ` +