From 8cfb7d38d01e9030c50233a43c5eda5714e68c54 Mon Sep 17 00:00:00 2001 From: Nuno Silva Date: Sun, 11 Oct 2020 12:03:03 +0100 Subject: [PATCH] Bug 1670465 - Use linkElement.relValues[i] instead of undefined rel. r=frg --- suite/browser/linkToolbarHandler.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/suite/browser/linkToolbarHandler.js b/suite/browser/linkToolbarHandler.js index 45af6a410c..310f43ec8e 100644 --- a/suite/browser/linkToolbarHandler.js +++ b/suite/browser/linkToolbarHandler.js @@ -29,8 +29,10 @@ function(element) if (linkElement.isIgnored()) return; for (var i = 0; i < linkElement.relValues.length; i++) { - if (linkElement.relValues.length > 1 && rel == "alternate") - continue; // skip "alternate" when we have "alternate XXX" + // Skip "alternate" when we have e.g. "alternate XXX". + if (linkElement.relValues.length > 1 && + linkElement.relValues[i] == "alternate") + continue; var linkType = LinkToolbarHandler.getLinkType(linkElement.relValues[i], element); if (linkType) {