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 #11604 from Snuffleupagus/eslint-prefer-starts-ends-with

Enable the `unicorn/prefer-starts-ends-with` ESLint plugin rule
This commit is contained in:
Tim van der Meij 2020-02-16 13:17:27 +01:00 committed by GitHub
commit 4092aa9fbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -78,7 +78,7 @@ function extractFilenameFromHeader(getResponseHeader) {
}
function createResponseStatusError(status, url) {
if (status === 404 || (status === 0 && /^file:/.test(url))) {
if (status === 404 || (status === 0 && url.startsWith("file:"))) {
return new MissingPDFException('Missing PDF "' + url + '".');
}
return new UnexpectedResponseException(