Commit 0adec576 authored by gergely-ujvari's avatar gergely-ujvari

Fix viewFilter._arrayMatches()

The filtered copy list was not assigned back to the variable and
accidently we were comparing the value.length instead of the filter.terms.length
to check whether all tags have matched or not.
parent 1d12f018
...@@ -736,12 +736,13 @@ class ViewFilter ...@@ -736,12 +736,13 @@ class ViewFilter
matches = true matches = true
# Make copy for filtering # Make copy for filtering
copy = value.slice() copy = value.slice()
copy.filter (e) ->
not match filter.terms, e
if (filter.operator is 'and' and copy.length < value.length) or copy = copy.filter (e) ->
match filter.terms, e
if (filter.operator is 'and' and copy.length < filter.terms.length) or
(filter.operator is 'or' and not copy.length) (filter.operator is 'or' and not copy.length)
matches = false matches = false
matches matches
_anyMatches: (filter, value, match) -> _anyMatches: (filter, value, match) ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment