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

filters with collator expressions incorrectly treated as legacy filters #6920

Closed
ChrisLoer opened this issue Jul 5, 2018 · 0 comments
Closed
Assignees

Comments

@ChrisLoer
Copy link
Contributor

The isExpressionFilter check doesn't know about the possible collator expression:

case '==':
case '!=':
case '>':
case '>=':
case '<':
case '<=':
return filter.length === 3 && (Array.isArray(filter[1]) || Array.isArray(filter[2]));

It should also support an optional case in which filter.length === 4 because a collator is being passed in.

I haven't tested yet, but I believe the result of this is that if you make a filter using an expression with a collator, it will incorrectly decide it's a legacy filter and attempt to convert it (which won't work because we don't support collators in legacy filters).

/cc @1ec5 @anandthakker

@ChrisLoer ChrisLoer self-assigned this Jul 5, 2018
ChrisLoer added a commit that referenced this issue Jul 6, 2018
Fixes issue #6920: feature filters using collator expressions would incorrectly be treated as legacy filters.
ChrisLoer added a commit that referenced this issue Jul 6, 2018
Fixes issue #6920: feature filters using collator expressions would incorrectly be treated as legacy filters.
jfirebaugh pushed a commit that referenced this issue Jul 9, 2018
Fixes issue #6920: feature filters using collator expressions would incorrectly be treated as legacy filters.
@jfirebaugh jfirebaugh mentioned this issue Sep 6, 2018
6 tasks
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

No branches or pull requests

2 participants