Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(filterFilter): fix matching against null/undefined #11617

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Apr 16, 2015

Included fixes:

  • Do not convert null/undefined to strings for substring matching in non-strict comparison mode.
    Prevents null/undefined from being matched against e.g. 'u'.
  • Let null (as a top-level filter expression) match "deeply" (as do booleans, numbers and strings).
    E.g. let filterFilter(arr, null) match an item like {someProp: null}.

Fixes #11573

(Cherry-picked from b5002ab to fix regressions as described in #11445 (comment).)

@gkalpak gkalpak force-pushed the v1.3.x_filterFilter-fix-matching-null-undefined branch from f978b63 to 2e574ec Compare April 16, 2015 14:30
@Narretz Narretz added this to the 1.3.16 milestone Apr 20, 2015
gkalpak added a commit that referenced this pull request Apr 28, 2015
Included fixes:

* Do not convert `null`/`undefined` to strings for substring matching in
  non-strict comparison mode. Prevents `null`/`undefined` from being matched
  against e.g. 'u'.
* Let `null` (as a top-level filter expression) match "deeply" (as do booleans,
  numbers and strings).
  E.g. let `filterFilter(arr, null)` match an item like `{someProp: null}`.

Fixes #11573

Closes #11617
@gkalpak gkalpak closed this Apr 29, 2015
@gkalpak gkalpak force-pushed the v1.3.x_filterFilter-fix-matching-null-undefined branch from 2e574ec to 9dd0fe3 Compare April 29, 2015 13:05
@gkalpak gkalpak deleted the v1.3.x_filterFilter-fix-matching-null-undefined branch April 29, 2015 13:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants