fix(runtime-core): fix component proxy props presence check

fix #864
This commit is contained in:
Evan You
2020-03-21 16:25:33 -04:00
parent c3bb3169f4
commit b3890a93e3
3 changed files with 22 additions and 14 deletions

View File

@@ -12,7 +12,8 @@ import {
toRawType,
PatchFlags,
makeMap,
isReservedProp
isReservedProp,
EMPTY_ARR
} from '@vue/shared'
import { warn } from './warning'
import { Data, ComponentInternalInstance } from './component'
@@ -216,11 +217,11 @@ function validatePropName(key: string) {
return false
}
function normalizePropsOptions(
export function normalizePropsOptions(
raw: ComponentPropsOptions | void
): NormalizedPropsOptions {
if (!raw) {
return [] as any
return EMPTY_ARR as any
}
if (normalizationMap.has(raw)) {
return normalizationMap.get(raw)!