|
|
|
@ -72,26 +72,24 @@ class Filter {
|
|
|
|
|
_in(value, key, result) {
|
|
|
|
|
let isValid = false
|
|
|
|
|
|
|
|
|
|
if (!result[key]) {
|
|
|
|
|
isValid = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Array.isArray(value)) {
|
|
|
|
|
let found = false
|
|
|
|
|
|
|
|
|
|
// run through array
|
|
|
|
|
value.forEach((v, index) => {
|
|
|
|
|
if (result[key].indexOf(v) !== -1) {
|
|
|
|
|
found = true
|
|
|
|
|
if (result[key]) {
|
|
|
|
|
if (Array.isArray(value)) {
|
|
|
|
|
let found = false
|
|
|
|
|
|
|
|
|
|
// run through array
|
|
|
|
|
value.forEach((v, index) => {
|
|
|
|
|
if (result[key].indexOf(v) !== -1) {
|
|
|
|
|
found = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (found) {
|
|
|
|
|
isValid = true
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (result[key].indexOf(value) !== -1) {
|
|
|
|
|
isValid = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (found) {
|
|
|
|
|
isValid = true
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (result[key].indexOf(value) !== -1) {
|
|
|
|
|
isValid = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|