mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
Filter: let tag queries be undefined
This commit is contained in:
@@ -8,7 +8,7 @@ export type Filter<K extends number = Kind> = {
|
|||||||
until?: number
|
until?: number
|
||||||
limit?: number
|
limit?: number
|
||||||
search?: string
|
search?: string
|
||||||
[key: `#${string}`]: string[]
|
[key: `#${string}`]: string[] | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
export function matchFilter(
|
export function matchFilter(
|
||||||
@@ -34,7 +34,7 @@ export function matchFilter(
|
|||||||
if (
|
if (
|
||||||
values &&
|
values &&
|
||||||
!event.tags.find(
|
!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
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user