Bug 1498904 - Fix logic to be a comparison and not an assignment. r=aceman DONTBUILD BETA_BASE_20181022
authorRichard Marti <richard.marti@gmail.com>
Mon, 22 Oct 2018 22:35:00 +0200
changeset 33438 5a8c03dfb2ac10a53f0c16ff87e39c8787ef0cb4
parent 33437 92010c1e95c1222f1fea4a07a92b23f1cbeb9848
child 33439 50d1c8bbaed1ddc45a8064ae38fc920ab45ba253
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersaceman
bugs1498904
Bug 1498904 - Fix logic to be a comparison and not an assignment. r=aceman DONTBUILD
mail/base/content/mailWindow.js
--- a/mail/base/content/mailWindow.js
+++ b/mail/base/content/mailWindow.js
@@ -734,24 +734,25 @@ function MailSetCharacterSet(aEvent) {
 /**
  * Called from the extensions manager to open an add-on options XUL document.
  * Only the "open in tab" option is supported, so that's what we'll do here.
  */
 function switchToTabHavingURI(aURI, aOpenNew, aOpenParams) {
   let tabmail = document.getElementById("tabmail");
   let matchingIndex = -1;
   if (tabmail) {
+    // about:preferences should be opened through openPreferencesTab().
+    if (aURI == "about:preferences") {
+      openPreferencesTab();
+      return;
+    }
+
     let openURI = makeURI(aURI);
     let tabInfo = tabmail.tabInfo;
 
-    // about:preferences should be opened through openPreferencesTab().
-    if (openURI = "about:preferences") {
-      openPreferencesTab();
-      return;
-    }
     // Check if we already have the same URL open in a content tab.
     for (let tabIndex = 0; tabIndex < tabInfo.length; tabIndex++) {
       if (tabInfo[tabIndex].mode.name == "contentTab") {
         let browserFunc = tabInfo[tabIndex].mode.getBrowser ||
                           tabInfo[tabIndex].mode.tabType.getBrowser;
         if (browserFunc) {
           let browser = browserFunc.call(tabInfo[tabIndex].mode.tabType, tabInfo[tabIndex]);
           if (browser.currentURI.equals(openURI)) {