check on change start
diff --git a/lib/utils.js b/lib/utils.js index 52183a7..27843f3 100644 --- a/lib/utils.js +++ b/lib/utils.js
@@ -315,6 +315,9 @@ var self = this; var inprogress = false; function eventFunction() { + if (!self.listeners[id]) { + return; + } if (inprogress) { inprogress = 'waiting'; return; @@ -369,9 +372,6 @@ }; Changes.prototype.notify = function (dbName) { - if (!(id in this.listeners)) { - return; - } this.emit(dbName); this.notifyLocalWindows(dbName); };