[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Web Labels parsing errors with latest Firefox

From: Antoine Lambert
Subject: Web Labels parsing errors with latest Firefox
Date: Tue, 7 Jan 2020 17:00:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1


When using LibreJS with latest Firefox version (71), the following type
of error is reported when a Web Labels table is parsed:

LibreJS: error parsing Web Labels at
https://archive.softwareheritage.org/jslicenses/, row
TypeError: "Array.map is not a function"

The following diff seems sufficient to fix the issue:

diff --git a/content/externalLicenseChecker.js
index 516057e..a936ed6 100644
--- a/content/externalLicenseChecker.js
+++ b/content/externalLicenseChecker.js
@@ -42,7 +42,7 @@
       let link = a => ({ url: a.href, label: a.textContent });
       let firstLink = parent => link(parent.querySelector("a"));
-      let allLinks = parent => Array.map(parent.querySelectorAll("a"),
+      let allLinks = parent =>
       for (let row of doc.querySelectorAll("table#jslicense-labels1 >
tbody > tr")) {
         try {
           let cols = row.querySelectorAll("td");

Best regards

Antoine Lambert

reply via email to

[Prev in Thread] Current Thread [Next in Thread]