mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix: fail to search by excluding labels with capital letter (#400)
* fix: fail to search by excluding labels with capital letter
* make all the excluded labels lowcased
* Revert "make all the excluded labels lowcased"
This reverts commit 866bed4080.
This commit is contained in:
parent
fb24d6d9ad
commit
b4420839bd
1 changed files with 5 additions and 8 deletions
|
|
@ -98,18 +98,15 @@ const parseLabelFilter = (
|
|||
return undefined
|
||||
}
|
||||
|
||||
// use lower case for label names
|
||||
const labels = str.toLocaleLowerCase().split(',')
|
||||
const labels = str.split(',')
|
||||
|
||||
// check if the labels are in the exclude list
|
||||
const excluded =
|
||||
exclude &&
|
||||
exclude.label &&
|
||||
labels.every((label) => exclude.label.includes(label))
|
||||
// check if the labels are on the exclusion list
|
||||
const excluded = exclude?.label && exclude.label.includes(...labels)
|
||||
|
||||
return {
|
||||
type: excluded ? LabelFilterType.EXCLUDE : LabelFilterType.INCLUDE,
|
||||
labels,
|
||||
// use lower case for label names
|
||||
labels: labels.map((label) => label.toLowerCase()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue