You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that the binary concatenation operator (~) always produces a string value.
We do that by utilizing the string template syntax instead of the binary plus (+) operator
in the transpiled code.
To make the generated code more efficient and easier to read we'll also collapse
sibling template literals into a single.
fixes#123
From the twig documentation,
the ~ operator converts all operands into strings and concatenates them.
Melody compiles this to javascript
+
, which is fine in case at least one of the operands is a string, but not if they are both eg. numbers.Both operands should be correctly converted to strings and then be concatenated.
Thanks :)
The text was updated successfully, but these errors were encountered: