diff --git a/src/database/query.ts b/src/database/query.ts index a05c077..1dfd4f5 100644 --- a/src/database/query.ts +++ b/src/database/query.ts @@ -209,7 +209,7 @@ export abstract class Query { oldKey = undefined; }; - const addSubscriber = () => { + const addSubscriber = (collection: string) => { let key = Database.getKey(collection, document); if (oldKey !== key) { if (oldKey !== undefined) removeSubscriber(); @@ -225,7 +225,7 @@ export abstract class Query { }; if (collection) { - addSubscriber(); + addSubscriber(collection); } return {