Skip to content

fix disjoint / superset - #298

Open
Fil wants to merge 2 commits into
mainfrom
fil/fix-disjoint
Open

Fil wants to merge 2 commits into
mainfrom
fil/fix-disjoint

Conversation

@Fil

@Fil Fil commented Nov 9, 2026

Copy link
Copy Markdown
Member

Two similar fixes:

  • superset matched 0 and -0 inconsistently: superset([-0], [0]) returned false, but superset([-0, 1], [1, 0]) returned true.
  • disjoint matched dates (and 0 and -0) inconsistently: disjoint([new Date(0)], [new Date(0)]) returned true (two different objects), but disjoint([1, new Date(0)], [new Date(0)]) returned false.

In both cases, we now check set membership, instead of comparing values with Object.is.

Supersedes #289.

@Fil
Fil requested a review from mbostock November 9, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant