Bug 1552700 - Change two instances of "const { cal }" to "var { cal }" to fix "SyntaxError: redeclaration of var cal". r=philipp
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 07 Jun 2019 10:49:56 +1200
changeset 35817 3b41b90ba85ae21731f12162d7769460523245ff
parent 35816 e73ec57351765daf1d9e629afc07e7dc54b07018
child 35818 b62e68799a992bd8baccd09a6f4e5937878b1c7a
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersphilipp
bugs1552700
Bug 1552700 - Change two instances of "const { cal }" to "var { cal }" to fix "SyntaxError: redeclaration of var cal". r=philipp
calendar/base/content/dialogs/calendar-conflicts-dialog.xul
calendar/base/content/dialogs/calendar-occurrence-prompt.xul
--- a/calendar/base/content/dialogs/calendar-conflicts-dialog.xul
+++ b/calendar/base/content/dialogs/calendar-conflicts-dialog.xul
@@ -8,17 +8,17 @@
 
 <dialog id="calendar-conflicts-dialog"
         windowtype="Calendar:Conflicts"
         onload="onLoad()"
         persist="screenX screenY"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
   <script src="chrome://calendar/content/mouseoverPreviews.js"/>
   <script><![CDATA[
-    const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+    var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
     function onLoad() {
         let docEl = document.documentElement;
         let item = window.arguments[0].item;
         let vbox = getPreviewForItem(item, false);
         if (vbox) {
             document.getElementById("item-box").replaceWith(vbox);
         }
 
--- a/calendar/base/content/dialogs/calendar-occurrence-prompt.xul
+++ b/calendar/base/content/dialogs/calendar-occurrence-prompt.xul
@@ -12,17 +12,17 @@
         buttons="accept,cancel"
         windowtype="Calendar:OccurrencePrompt"
         onload="onLoad()"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns:xhtml2="http://www.w3.org/TR/xhtml2"
         xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#"
         xhtml2:role="wairole:alertdialog">
   <script><![CDATA[
-      const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+      var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
       document.addEventListener("dialogaccept", () => exitOccurrenceDialog(1));
       document.addEventListener("dialogcancel", () => exitOccurrenceDialog(0));
 
       function exitOccurrenceDialog(aReturnValue) {
           window.arguments[0].value = aReturnValue;
           window.close();
       }