From 2eb92608a0c8ad169c5c418c66ce134746152f3d Mon Sep 17 00:00:00 2001 From: Cazacu Vlad-Gabriel Date: Fri, 26 Jan 2024 12:41:01 +0200 Subject: [PATCH] Fix for conflicting cursor events --- lib/subscription.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/subscription.js b/lib/subscription.js index d70afbb..eb260fc 100644 --- a/lib/subscription.js +++ b/lib/subscription.js @@ -22,7 +22,8 @@ class Subscription { added (collectionName, doc) { this.refCounter.increment(collectionName, doc._id) - if (this._hasDocChanged(collectionName, doc._id, doc)) { + const existingDoc = this.docHash[buildHashKey(collectionName, doc.id)] + if (!existingDoc) { debugLog('Subscription.added', `${collectionName}:${doc._id}`) this.meteorSub.added(collectionName, doc._id, doc) this._addDocHash(collectionName, doc)