Fix getEventsByIdForUrl for filters with ids

This commit is contained in:
Jon Staab
2026-02-13 11:52:05 -08:00
parent 55c75479c1
commit ca8a2754b9
+2 -2
View File
@@ -1,5 +1,5 @@
import {readable, Readable} from "svelte/store" import {readable, Readable} from "svelte/store"
import {on, assoc, now, mapPop, Maybe, MaybeAsync, call, sortBy, first} from "@welshman/lib" import {on, now, mapPop, Maybe, MaybeAsync, call, sortBy, first} from "@welshman/lib"
import { import {
matchFilters, matchFilters,
getIdFilters, getIdFilters,
@@ -251,7 +251,7 @@ export const getEventsByIdForUrl = ({
includeDeleted, includeDeleted,
}: EventsByIdForUrlOptions) => { }: EventsByIdForUrlOptions) => {
const initialIds = Array.from(tracker.getIds(url)) const initialIds = Array.from(tracker.getIds(url))
const initialFilters = filters.map(assoc("ids", initialIds)) const initialFilters = filters.map(filter => ({ids: initialIds, ...filter}))
const eventsById: EventsById = new Map() const eventsById: EventsById = new Map()
for (const event of repository.query(initialFilters, {includeDeleted})) { for (const event of repository.query(initialFilters, {includeDeleted})) {