Subscribe on changes!

:else does not work with :if

avatar
Aug 24th 2022

Vue version

3.2.37

Link to minimal reproduction

https://sfc.vuejs.org/#eNp9kL1uxCAQhF9lQ6RUxqRK4TiW0iUPkI7GP+szFwPWgu3i5HcPYOd0SqTrYGb5hp0Le5+mfJmRFaz0qKex9lhJA1B2aoFC9W+SeZpRsurLtFZrNF6ZE/gBYVQGocHRrtAQ1t8uqa3tsGyoenp8eX5NEBwdgqhKEW47+4HzI+DwgPPkXJMXnqL7Ovgh+0N1HZobwj4TX1ef0NYG5sDZBViVHxIgg2b20TXWp4E9LvlhtV9cKa6bs4wpPVnyXNdTfnbWhGIu6WeH4SQrIClRC83Fu2SD95MrhHB9G+s8u9zSSYRTTnNoTGOOTvOG7OqQAliy7IYhgrggcULTISHdY/4Z/ceN2E2ajW0/EROghQ==

Steps to reproduce

Simple write a tag with an :if attribute then follow it with a tag with an :else attribute.

What is expected?

Expected to have the same behavior as v-if, v-else

What is actually happening?

Vue throws an Internal server error, 'v-bind is missing expression.'

System Info

No response

Any additional comments?

No response

avatar
Aug 24th 2022

That wrror is correct. You cant v-bind without a value. And no, this is not supposed to work like v-if/v-else, so it doesnt.