Skip to content

ifNth arguments seem to be switched #306

Open
@evenfrost

Description

@evenfrost

var isNth = utils.isNumber(a) && utils.isNumber(b) && b % a === 0;

Is there any idea behind switching arguments (b % a) here? Documentation says that

Conditionally renders a block if the remainder is zero when a operand is divided by b.

but logic seems to be inverse. I spent plenty of time trying to figure out why my ifNth is not working as supposed, or I just don't get it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions