summaryrefslogtreecommitdiffstats
path: root/browser/base/content/browser-syncui.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-24 19:26:11 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-24 19:26:11 +0200
commit9b88e7cf78c6845805883c6ede9b83768675d9b0 (patch)
tree04d06d55cad01190095c86025a06866329227ffa /browser/base/content/browser-syncui.js
parentbccb9c1708f007ada1ea8c4879db88a587f0a450 (diff)
downloadUXP-9b88e7cf78c6845805883c6ede9b83768675d9b0.tar
UXP-9b88e7cf78c6845805883c6ede9b83768675d9b0.tar.gz
UXP-9b88e7cf78c6845805883c6ede9b83768675d9b0.tar.lz
UXP-9b88e7cf78c6845805883c6ede9b83768675d9b0.tar.xz
UXP-9b88e7cf78c6845805883c6ede9b83768675d9b0.zip
moebius#209: Throws an error - "CloudSync is not defined"
https://github.com/MoonchildProductions/moebius/pull/209
Diffstat (limited to 'browser/base/content/browser-syncui.js')
-rw-r--r--browser/base/content/browser-syncui.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/browser/base/content/browser-syncui.js b/browser/base/content/browser-syncui.js
index c5c2995c8..51bcb15d5 100644
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -4,10 +4,10 @@
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-if (AppConstants.MOZ_SERVICES_CLOUDSYNC) {
- XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
- "resource://gre/modules/CloudSync.jsm");
-}
+#ifdef MOZ_SERVICES_CLOUDSYNC
+XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
+ "resource://gre/modules/CloudSync.jsm");
+#endif
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
"resource://gre/modules/FxAccounts.jsm");
@@ -170,9 +170,13 @@ var gSyncUI = {
document.getElementById("sync-setup-state").hidden = true;
document.getElementById("sync-syncnow-state").hidden = true;
+#ifdef MOZ_SERVICES_CLOUDSYNC
if (CloudSync && CloudSync.ready && CloudSync().adapters.count) {
document.getElementById("sync-syncnow-state").hidden = false;
} else if (loginFailed) {
+#else
+ if (loginFailed) {
+#endif
// unhiding this element makes the menubar show the login failure state.
document.getElementById("sync-reauth-state").hidden = false;
} else if (needsSetup) {