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:
parent
40aa593b1f
commit
ad95df2214
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue