Subscribe on changes!

Custom Web Elements/Components receive `null` instead of `false` on subsequent re-render

avatar
Feb 12th 2024

Vue version

3.4.18

Link to minimal reproduction

https://jsfiddle.net/uwegz5y8/23/

Steps to reproduce

  1. Load repro
  2. See Boo: false; typeof: boolean - as expected, because boo attribute is not set
  3. Click "Toggle Boo"
  4. See Boo: true; typeof: boolean - as expected, because now boo attribute is set
  5. Click "Toggle Boo" again
  6. See Boo: null; typeof: object - unexpected, since boo attribute is removed - we expect to receive false just like in the 2nd step previously

What is expected?

false

What is actually happening?

null

System Info

No response

Any additional comments?

Kinda related: https://github.com/vuejs/core/issues/9697

avatar
Feb 12th 2024

duplicated of #9006

avatar
Feb 12th 2024

duplicated of #9006

I'm not sure about that, on the surface it seems to be a different use-case since I don't use the default value, I can even make my prop to be required.

However, it is related, so I imagine that the same fix could resolve both issues at the same time.