Skip to content

Math.floor blocks float in divided_by filter #59

@tim-phillips

Description

@tim-phillips

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/

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions