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
Hello, I am currently running version 0.8.3.3 of this library in my application and when going to upgrade to the more recent 0.9.0.2 that some of our previous logic is now invalid due to these type checks. This appears to be happening even when the withStrictTypedExpressions flag is set to false, and based on the README description of this option, this appears to be a bug.
Steps to reproduce:
When rendering a comparison between a number and a string and withStrictTypedExpressions is set to false
Expected Behavior: An empty string should be rendered Actual Behavior: RuntimeException is thrown
java.lang.RuntimeException: Cannot compare 0 with A because they are not the same type: liqp.PlainBigDecimal vs java.lang.String
at liqp.nodes.LtNode.doCompare(LtNode.java:22)
at liqp.nodes.ComparingExpressionNode.render(ComparingExpressionNode.java:97)
at liqp.blocks.If.render(If.java:16)
at liqp.nodes.InsertionNode.render(InsertionNode.java:34)
at liqp.nodes.BlockNode.render(BlockNode.java:36)
Flag usage elsewhere
This behavior appears to be inconsistent and does not apply to comparison which contain booleans or make non-relative comparisons. It is unclear why these would be intentionally allowed, but the above would not.
Hello, I am currently running version
0.8.3.3
of this library in my application and when going to upgrade to the more recent0.9.0.2
that some of our previous logic is now invalid due to these type checks. This appears to be happening even when thewithStrictTypedExpressions
flag is set to false, and based on the README description of this option, this appears to be a bug.Steps to reproduce:
When rendering a comparison between a number and a string and
withStrictTypedExpressions
is set to falseExpected Behavior: An empty string should be rendered
Actual Behavior: RuntimeException is thrown
Flag usage elsewhere
This behavior appears to be inconsistent and does not apply to comparison which contain booleans or make non-relative comparisons. It is unclear why these would be intentionally allowed, but the above would not.
IE, these examples both render fine.
The text was updated successfully, but these errors were encountered: