commit e34c9e04e8dcd457066f5f7c3760035ba68a27ff
parent 6139f7045ecfc64bd43232377c864ccf3c9fac77
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 20 Sep 2016 18:32:37 -0400
Fix global variable
Diffstat:
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
@@ -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);
}
}