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

Enable the unicorn/prefer-includes linting rule

For more information refer to
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md.

Fortunately this only required one change because we already use
`.includes()` everywhere else. Note that that is mostly due to the
`mozilla/use-includes-instead-of-indexOf` rule which we replace with
this new rule now because it's more complete.
This commit is contained in:
Tim van der Meij 2024-08-06 18:27:07 +02:00
parent 40aa593b1f
commit ad95df2214
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
2 changed files with 2 additions and 2 deletions

View file

@ -1075,7 +1075,7 @@ class Driver {
this.output.textContent += message;
}
if (message.lastIndexOf("\n") >= 0 && !this.disableScrolling.checked) {
if (message.includes("\n") && !this.disableScrolling.checked) {
// Scroll to the bottom of the page
this.output.scrollTop = this.output.scrollHeight;
}