-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.7.14
Reproduction link
Steps to reproduce
// Comp.vue
defineProps<{ msg: boolean | null }>();
<!-- App.vue -->
<template>
<Comp :msg="null" />
</template>
What is expected?
What is actually happening?
Invalid prop type: "null" is not a constructor
and Invalid prop: type check failed for prop "msg". Expected Boolean, , got Null
warnings
Additional notes
Warnings per se are not the issue, they can be fixed by changing the prop definition to msg?: boolean
which also accepts booleans, the issue is that this behaviour is not same as in Vue 3
Metadata
Metadata
Assignees
Labels
No labels