summaryrefslogtreecommitdiffstats
path: root/browser/components/preferences/tests/browser_applications_selection.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/preferences/tests/browser_applications_selection.js')
-rw-r--r--browser/components/preferences/tests/browser_applications_selection.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/browser/components/preferences/tests/browser_applications_selection.js b/browser/components/preferences/tests/browser_applications_selection.js
index 683ce76a89..23f0e00af8 100644
--- a/browser/components/preferences/tests/browser_applications_selection.js
+++ b/browser/components/preferences/tests/browser_applications_selection.js
@@ -335,10 +335,12 @@ add_task(async function sortingCheck() {
"Number of items should not change."
);
for (let i = 0; i < siteItems.length - 1; ++i) {
- let aType = siteItems[i].getAttribute("actionDescription").toLowerCase();
- let bType = siteItems[i + 1]
- .getAttribute("actionDescription")
- .toLowerCase();
+ let aType = (
+ siteItems[i].getAttribute("actionDescription") || ""
+ ).toLowerCase();
+ let bType = (
+ siteItems[i + 1].getAttribute("actionDescription") || ""
+ ).toLowerCase();
let result = 0;
if (aType > bType) {
result = 1;
@@ -375,10 +377,12 @@ add_task(async function sortingCheck() {
"Number of items should not change."
);
for (let i = 0; i < siteItems.length - 1; ++i) {
- let aType = siteItems[i].getAttribute("typeDescription").toLowerCase();
- let bType = siteItems[i + 1]
- .getAttribute("typeDescription")
- .toLowerCase();
+ let aType = (
+ siteItems[i].getAttribute("typeDescription") || ""
+ ).toLowerCase();
+ let bType = (
+ siteItems[i + 1].getAttribute("typeDescription") || ""
+ ).toLowerCase();
let result = 0;
if (aType > bType) {
result = 1;