Skip to content

Priority 1 should be higher priority than 2 !? #141

@nileio

Description

@nileio

First of all thanks for the module!
It was not immediately available to me that priorities of rules are not as I'd expect them to be.. usually priority 1 is higher priority than priority 2 , 3 , etc.
On debugging my code, I discovered that the order of rules evaluation starts from the highest number.. thisHolder.activeRules array orders by higher numbers first.

This might just be semantic, but often priority with lower numbers precede the higher numbers because they are considered high importance, also in many situations we do not know the number of rules in advance , so it is much easier to just start from 1 ..

i know this can be a breaking change but I just thought to mention in case others have not noticed it too..
I also noted that the wiki explains that higher number priorities are evaluated first, but I must admit I did not read it initially and have not paid enough attention, as I thought priority 1 means higher priority ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions