From 2a62c3d3ac5ad30f9d3eb4e37b913fe604cb1d3d Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Tue, 24 Mar 2020 15:18:13 +0100 Subject: [PATCH] Fixing error --- src/database/query.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {