From e34c9e04e8dcd457066f5f7c3760035ba68a27ff Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 20 Sep 2016 18:32:37 -0400 Subject: [PATCH] Fix global variable --- chrome/content/zotero/xpcom/sync/syncEventListeners.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/sync/syncEventListeners.js b/chrome/content/zotero/xpcom/sync/syncEventListeners.js index 8b2ad3a679..fb9660d30e 100644 --- a/chrome/content/zotero/xpcom/sync/syncEventListeners.js +++ b/chrome/content/zotero/xpcom/sync/syncEventListeners.js @@ -1,3 +1,5 @@ +"use strict"; + Zotero.Sync.EventListeners = { /** * Start all listeners @@ -108,7 +110,7 @@ Zotero.Sync.EventListeners.AutoSyncListener = { }, register: function () { - _observerID = Zotero.Notifier.registerObserver(this, false, 'autosync'); + this._observerID = Zotero.Notifier.registerObserver(this, false, 'autosync'); }, notify: function (event, type, ids, extraData) { @@ -158,7 +160,7 @@ Zotero.Sync.EventListeners.AutoSyncListener = { }, unregister: function () { - if (_observerID) { + if (this._observerID) { Zotero.Notifier.unregisterObserver(_observerID); } }