Fix global variable

This commit is contained in:
Dan Stillman 2016-09-20 18:32:37 -04:00
parent 6139f7045e
commit e34c9e04e8

View file

@ -1,3 +1,5 @@
"use strict";
Zotero.Sync.EventListeners = { Zotero.Sync.EventListeners = {
/** /**
* Start all listeners * Start all listeners
@ -108,7 +110,7 @@ Zotero.Sync.EventListeners.AutoSyncListener = {
}, },
register: function () { register: function () {
_observerID = Zotero.Notifier.registerObserver(this, false, 'autosync'); this._observerID = Zotero.Notifier.registerObserver(this, false, 'autosync');
}, },
notify: function (event, type, ids, extraData) { notify: function (event, type, ids, extraData) {
@ -158,7 +160,7 @@ Zotero.Sync.EventListeners.AutoSyncListener = {
}, },
unregister: function () { unregister: function () {
if (_observerID) { if (this._observerID) {
Zotero.Notifier.unregisterObserver(_observerID); Zotero.Notifier.unregisterObserver(_observerID);
} }
} }