mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Enable the unicorn/prefer-ternary
ESLint plugin rule
To limit the readability impact of these changes, the `only-single-line` option was used; please find additional details at https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md These changes were done automatically, using the `gulp lint --fix` command.
This commit is contained in:
parent
8f83a1359e
commit
674e7ee381
31 changed files with 123 additions and 265 deletions
|
@ -1126,17 +1126,9 @@ class Doc extends PDFObject {
|
|||
nEnd = printParams.lastPage;
|
||||
}
|
||||
|
||||
if (typeof nStart === "number") {
|
||||
nStart = Math.max(0, Math.trunc(nStart));
|
||||
} else {
|
||||
nStart = 0;
|
||||
}
|
||||
nStart = typeof nStart === "number" ? Math.max(0, Math.trunc(nStart)) : 0;
|
||||
|
||||
if (typeof nEnd === "number") {
|
||||
nEnd = Math.max(0, Math.trunc(nEnd));
|
||||
} else {
|
||||
nEnd = -1;
|
||||
}
|
||||
nEnd = typeof nEnd === "number" ? Math.max(0, Math.trunc(nEnd)) : -1;
|
||||
|
||||
this._send({ command: "print", start: nStart, end: nEnd });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue