Skip to content

Commit

Permalink
fix(compat): fix props check for v-model compat warning (#4056)
Browse files Browse the repository at this point in the history
  • Loading branch information
DV8FromTheWorld authored Jul 4, 2021
1 parent 348c3b0 commit f3e15f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/runtime-core/src/compat/compatConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ` +
Expand Down

0 comments on commit f3e15f6

Please sign in to comment.