Subscribe on changes!

Components with 'extends' and 'props' result in this.$options.props instanceof Object evaluating to false

avatar
May 23rd 2023

Vue version

3.3.4

Link to minimal reproduction

https://play.vuejs.org/#__DEV__eNqNU8tu20AM/BVCKGIbsHdhpCfVLZL20kuRAj30shfZom0l2ge4VB4w/O/lrvxQnKCtL5aG5JCcEXfFbQjqscOiLBZxRU1giMhd+GJcY4Mnhh0QrmEPa/IWRpI6OoW+eRsOuNLpJTGNAIxb6J5MaBaMNrQVozwDLFKaTrA+4cW06AlntgrqPnon0+xStjkEoilKyEjCpEl6N8WWOcRS686Fh41aeatvJKapc9xYnNXe3lyra/VR103kIaww2tmS/FNEkoammA64tYCPSDNCVyMh/bXXRe6w30XoTc/Ucm/cXtY/and24ax/is1fqTzPMhtnHD7nlBrXVdeKVYkSn1k6xrIvlMUMB/IyewobNmzj5iQmAL8ELOEXU+M2BxXgSJj2/o5t66fw21Nbp5kTg0wto+ds60VVrMeTI+PKu+hbVK3fjHnbRPXBB24EVHkKaFzkyq3Qr+FueY8rnvR1WsNXwuohglRRDaEifoG2WVJFDSa0YugiAqpNeSp5r8PV1Xuw2lbx7sn9lGcU5vFIZBide9+20UtZsgeQyJPs/j/7ZIbk4uCbPxiabfrHXU1FjyTCFLz70Ut5cWrGpQkY+t0+J2sah2mNOM6GZjt7/2SMyadXx/fm/Lbz/C+/3Q6kFPbZzIXOgeFR7v8AiAtqZg==

Steps to reproduce

Open the browsers console to view the console.log output

The error is being generated in Comp.vue

What is expected?

this.$options.props should have an Object prototype and all JavaScript Object functions (e.g. toString(), hasOwnProperty())

What is actually happening?

this.$options.props is an Object without a prototype. You can access it's properties as normal, but not any Object functions that normal JavaScript Objects have.

System Info

Reproduction link is via play.vuejs.com with Vue 3.3.4

Any additional comments?

No response