From f8e907c72d4a4f711b9577ea6af41309733e3a78 Mon Sep 17 00:00:00 2001 From: Lasana Murray Date: Wed, 9 Feb 2022 12:41:54 +0200 Subject: [PATCH] Bug 1754310 - Do not use clearPending() before it is declared. r=darktrojan Differential Revision: https://phabricator.services.mozilla.com/D138216 --HG-- extra : amend_source : a803e9978ea4036999ee98a589ffa20adbaf6b4e --- calendar/base/src/calCachedCalendar.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/calendar/base/src/calCachedCalendar.js b/calendar/base/src/calCachedCalendar.js index 40a073ba15..76a8c306ad 100644 --- a/calendar/base/src/calCachedCalendar.js +++ b/calendar/base/src/calCachedCalendar.js @@ -281,15 +281,15 @@ calCachedCalendar.prototype = { return this.mPendingSync; }, async _doSynchronize() { + let clearPending = () => { + this.mPendingSync = null; + }; + if (this.getProperty("disabled")) { clearPending(); return; } - let clearPending = () => { - this.mPendingSync = null; - }; - if (this.offline) { clearPending(); return;