1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16: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

@ -67,7 +67,7 @@ class FileSpec {
if (!this._filename && this.root) {
const filename = pickPlatformItem(this.root) || "unnamed";
this._filename = stringToPDFString(filename)
.replace(/\\\\/g, "\\")
.replace(/\\\\/g, "\\") // lgtm [js/double-escaping]
.replace(/\\\//g, "/")
.replace(/\\/g, "/");
}

View file

@ -192,8 +192,6 @@ function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {
let k;
if (y < y1) {
k = 0;
} else if (y1 === y2) {
k = 1;
} else {
k = (y1 - y) / (y1 - y2);
}