Skip to content
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

Improve base comparator method #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Improve base comparator method #37

wants to merge 1 commit into from

Conversation

eddiemf
Copy link

@eddiemf eddiemf commented Mar 21, 2019

The base comparator method currently breaks if you pass an associative array containing a node, because for some reason we can't directly compare arrays, AAs or nodes.

With the following changes, the base comparator will return an early false if it sees that both values have different types, and it will also compare node types using the isSameNode method available on nodes.

Some changes were also made to improve readability, removing needless repeated lines.

The base comparator method currently breaks if you pass an associative array containing a node, because for some reason we can't directly compare arrays, AAs or nodes.

With the following changes, the base comparator will return an early `false` if it sees that both values have different types, and it will also compare node types using the `isSameNode` method available on nodes.

Some changes were also made to improve readability, removing needless repeated lines.
@pawelhertman
Copy link

pawelhertman commented Jun 8, 2020

@RokuDevTools @RokuRnD it's been over a year. Could you please at least take a look and reply?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants