Bug 1557018 follow-up - Tidy a slight mess; rs=me
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 11 Jun 2019 15:45:17 +1200
changeset 26858 c3a368a1bca2bcb20c7f92cfe5c82ea1d159bc96
parent 26857 fe5ced6a8398bb4438540773bcd19ecea67270d7
child 26859 f6d100d63838d747a56735854aecb78cc415acda
push id16030
push usergeoff@darktrojan.net
push dateTue, 11 Jun 2019 03:45:50 +0000
treeherdercomm-central@c3a368a1bca2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1557018
Bug 1557018 follow-up - Tidy a slight mess; rs=me
mail/test/resources/mozmill/mozmill/extension/content/modules/elementslib.jsm
--- a/mail/test/resources/mozmill/mozmill/extension/content/modules/elementslib.jsm
+++ b/mail/test/resources/mozmill/mozmill/extension/content/modules/elementslib.jsm
@@ -407,24 +407,24 @@ Lookup.prototype.exists = function() {
 };
 Lookup.prototype.getNode = function() {
   var expSplit = smartSplit(this.expression).filter(e => e != "");
   expSplit.unshift(this._view.document);
   var _document = this._view.document;
   var nCases = {"id": _byID, "name": _byName, "attrib": _byAttrib, "index": _byIndex};
   var aCases = {"name": _anonByName, "attrib": _anonByAttrib, "index": _anonByIndex};
   var reduceLookup = function(parent, exp) {
-    // Handle case where only index is provided
-    var cases = nCases;
-
     // Handle custom elements shadow DOM
     if (exp == "shadow") {
       return parent.shadowRoot;
     }
 
+    // Handle case where only index is provided
+    var cases = nCases;
+
     // Handle ending index before any of the expression gets mangled
     if (exp.endsWith("]")) {
       var expIndex = JSON.parse(strings.vslice(exp, "[", "]"));
     }
     // Handle anon
     if (exp.startsWith("anon")) {
       exp = strings.vslice(exp, "(", ")");
       cases = aCases;