[x] I have tested my example against Shopify Liquid. (This isn't necessary if the actual behavior is a panic, or an error for which IsTemplateError returns false.)
Expected Behavior
Don't panic when applying the divided_by filter with zero divisor, instead raise an error.
Actual Behavior
Filter evaluation panics when divided_by is applied with zero divisor:
{{ 20 | divided_by: 0 }} -> panics
Detailed Description
In liquidjs, when dividing by zero, Inf is returned and in Shopify an error is returned.
Possible Solution
When evaluating an expression where divided_by is used with a zero divisor, don't panic, instead return an error.
Checklist
IsTemplateError
returns false.)Expected Behavior
Don't panic when applying the
divided_by
filter with zero divisor, instead raise an error.Actual Behavior
Filter evaluation panics when
divided_by
is applied with zero divisor:Detailed Description
In liquidjs, when dividing by zero,
Inf
is returned and in Shopify an error is returned.Possible Solution
When evaluating an expression where
divided_by
is used with a zero divisor, don't panic, instead return an error.