Open LucasLefevre opened 3 months ago
t-if="" generates code which is not valid javascript.
t-if=""
it generates code which looks like
""" if () { // ... } """
It crashes when owl tries to compile the code Error: Failed to compile template "Root": Unexpected token ')'
Error: Failed to compile template "Root": Unexpected token ')'
The error message isn't very helpful to debug/fix the xml template, especially if the template is quite large and the generated code is also big.
class Root extends Component { static components = {}; static template = "Root" }
<templates> <t t-name="Root"> <div t-if="">Hi!</div> </t> </templates>
:point_right: Playground
yeah, seems like we could improve this...
t-if=""
generates code which is not valid javascript.it generates code which looks like
It crashes when owl tries to compile the code
Error: Failed to compile template "Root": Unexpected token ')'
The error message isn't very helpful to debug/fix the xml template, especially if the template is quite large and the generated code is also big.
:point_right: Playground