Filter: let tag queries be undefined

This commit is contained in:
Alex Gleason
2023-08-12 12:25:55 -05:00
committed by fiatjaf_
parent 9efdd16e26
commit e00362e7c9

View File

@@ -8,7 +8,7 @@ export type Filter<K extends number = Kind> = {
until?: number
limit?: number
search?: string
[key: `#${string}`]: string[]
[key: `#${string}`]: string[] | undefined
}
export function matchFilter(
@@ -34,7 +34,7 @@ export function matchFilter(
if (
values &&
!event.tags.find(
([t, v]) => t === f.slice(1) && values.indexOf(v) !== -1
([t, v]) => t === f.slice(1) && values!.indexOf(v) !== -1
)
)
return false