diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index aba98f4eb9a..4409ca3a1ca 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -622,12 +622,10 @@ function validateProp( if (type != null && type !== true) { let isValid = false const types = isArray(type) ? type : [type] - if (types.includes(null as any)) { - return - } const expectedTypes = [] // value is valid as long as one of the specified types match for (let i = 0; i < types.length && !isValid; i++) { + if (types[i] === null) return const { valid, expectedType } = assertType(value, types[i]) expectedTypes.push(expectedType || '') isValid = valid