mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-13 02:20:06 -04:00
Fixes boolean search
This commit is contained in:
parent
a5ea157146
commit
1cafbccc9e
1 changed files with 166 additions and 164 deletions
|
@ -45,6 +45,7 @@ export function search(_query) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const regex = new RegExp(f.value.replaceAll(',', '|'), 'i')
|
const regex = new RegExp(f.value.replaceAll(',', '|'), 'i')
|
||||||
|
// console.log(regex, c._searchable[f.field])
|
||||||
results.push(regex.test(c._searchable[f.field]))
|
results.push(regex.test(c._searchable[f.field]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +100,8 @@ function generateSearchable(c) {
|
||||||
if (Array.isArray(c[key])) {
|
if (Array.isArray(c[key])) {
|
||||||
searchable[key] = c[key].map(v => v.toString().toLowerCase()).join(',')
|
searchable[key] = c[key].map(v => v.toString().toLowerCase()).join(',')
|
||||||
} else {
|
} else {
|
||||||
searchable[key] = c[key] ? c[key].toString().toLowerCase() : ''
|
searchable[key] =
|
||||||
|
c[key] !== undefined && c[key] !== null ? c[key].toString().toLowerCase() : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
searchable.streams = c._streams.length
|
searchable.streams = c._streams.length
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue