-
-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Math.floor blocks float in divided_by filter #59
Comments
It seems JavaScript |
You're right, it seems that javascript cannot handle the |
Since we have |
I already added this to my project:
So yes, I agree with returning the float as is. |
Now |
In
filters.js
,divided_by
is defined as'divided_by': (v, arg) => Math.floor(v / arg)
.However in the Liquid documentation it says that if given a float it will return a float (under the section "Controlling rounding").
Math.floor
prevents that.https://shopify.github.io/liquid/filters/divided_by/
The text was updated successfully, but these errors were encountered: