You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An Object with an overridden Symbol.toStringTag getter should be a valid prop for type:Object
What is actually happening?
The type assertion uses the StringTag to compare the type of objects when the prop type is the Object constructor.
For type assertion of objects in assertType [2], toRawType [3] is used, where it would be more intuitive to just use typeof prop === 'object' && prop !== null.
Version
3.0.0-rc.5
Reproduction link
https://github.com/SebastianSpeitel/vue-bug-stringtag
Steps to reproduce
Build and run Vue App.
Then look in the console.
What is expected?
An Object with an overridden
Symbol.toStringTag
getter should be a valid prop fortype:Object
What is actually happening?
The type assertion uses the StringTag to compare the type of objects when the prop type is the Object constructor.
For type assertion of objects in
assertType
[2],toRawType
[3] is used, where it would be more intuitive to just usetypeof prop === 'object' && prop !== null
.[2]:
https://github.com/vuejs/vue-next/blob/304830a764cd9f28098cfb0ac0e520e1bb2f57c7/packages/runtime-core/src/componentProps.ts#L489-L510
[3]:
https://github.com/vuejs/vue-next/blob/304830a764cd9f28098cfb0ac0e520e1bb2f57c7/packages/shared/src/index.ts#L76-L78
The text was updated successfully, but these errors were encountered: