Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ritechoice23's avatar

Boolean not compiling well in vue 3 and Inertia js

I am working on an application, when ever I fetch a boolean data from the database it will work well in dev but when I compile it to production it will fail. eg data = {isTrue: 1}

if is do v-if="data.isTure" in dev, it will work well but when compiled it will not work. anyway out please

0 likes
2 replies
vincent15000's avatar
Level 63

Does the value of this variable come from a model passed to the view ?

If yes, have you added a casting for the boolean properties in the model ?

Please or to participate in this conversation.