1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #13787 from Snuffleupagus/lgtm-fix-warnings

Fix (most) LGTM warnings
This commit is contained in:
Tim van der Meij 2021-07-24 15:20:07 +02:00 committed by GitHub
commit 41a2b5c809
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 9 deletions

View file

@ -22,7 +22,7 @@ describe("Interaction", () => {
}
await action();
await page.waitForFunction(
`document.querySelector("${selector.replace("\\", "\\\\")}").value !== ""`
`document.querySelector("${selector.replace("\\", "\\\\")}").value !== ""` // lgtm [js/incomplete-sanitization]
);
return page.$eval(selector, el => el.value);
}

View file

@ -262,11 +262,9 @@ function startRefTest(masterMode, showRefImages) {
} else if (showRefImages && numEqFailures > 0) {
console.log();
console.log(
"Starting reftest harness to examine " +
numEqFailures +
" eq test failures."
`Starting reftest harness to examine ${numEqFailures} eq test failures.`
);
examineRefImages(numEqFailures);
examineRefImages();
}
}

View file

@ -153,7 +153,7 @@ WebServer.prototype = {
fileSize = stats.size;
var isDir = stats.isDirectory();
if (isDir && !/\/$/.test(pathPart)) {
res.setHeader("Location", pathPart + "/" + urlParts[2]);
res.setHeader("Location", pathPart + "/" + urlParts[2]); // lgtm [js/server-side-unvalidated-url-redirection]
res.writeHead(301);
res.end("Redirected", "utf8");
return;