mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Enable the mozilla/use-includes-instead-of-indexOf
ESLint rule globally
This rule is available from https://www.npmjs.com/package/eslint-plugin-mozilla, and is enforced in mozilla-central. Note that we have the necessary `Array`/`String` polyfills and that most cases have already been fixed, see PRs 9032 and 9434.
This commit is contained in:
parent
2eb29409bc
commit
1cf116ab88
14 changed files with 21 additions and 17 deletions
|
@ -192,7 +192,7 @@ class PDFLinkService {
|
|||
*/
|
||||
setHash(hash) {
|
||||
let pageNumber, dest;
|
||||
if (hash.indexOf('=') >= 0) {
|
||||
if (hash.includes('=')) {
|
||||
let params = parseQueryString(hash);
|
||||
if ('search' in params) {
|
||||
this.eventBus.dispatch('findfromurlhash', {
|
||||
|
@ -215,7 +215,7 @@ class PDFLinkService {
|
|||
let zoomArg = zoomArgs[0];
|
||||
let zoomArgNumber = parseFloat(zoomArg);
|
||||
|
||||
if (zoomArg.indexOf('Fit') === -1) {
|
||||
if (!zoomArg.includes('Fit')) {
|
||||
// If the zoomArg is a number, it has to get divided by 100. If it's
|
||||
// a string, it should stay as it is.
|
||||
dest = [null, { name: 'XYZ', },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue