mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +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
|
@ -814,11 +814,9 @@ class XRef {
|
|||
this._pendingRefs.put(ref);
|
||||
|
||||
try {
|
||||
if (xrefEntry.uncompressed) {
|
||||
xrefEntry = this.fetchUncompressed(ref, xrefEntry, suppressEncryption);
|
||||
} else {
|
||||
xrefEntry = this.fetchCompressed(ref, xrefEntry, suppressEncryption);
|
||||
}
|
||||
xrefEntry = xrefEntry.uncompressed
|
||||
? this.fetchUncompressed(ref, xrefEntry, suppressEncryption)
|
||||
: this.fetchCompressed(ref, xrefEntry, suppressEncryption);
|
||||
this._pendingRefs.remove(ref);
|
||||
} catch (ex) {
|
||||
this._pendingRefs.remove(ref);
|
||||
|
@ -873,11 +871,10 @@ class XRef {
|
|||
}
|
||||
throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${ref}`);
|
||||
}
|
||||
if (this.encrypt && !suppressEncryption) {
|
||||
xrefEntry = parser.getObj(this.encrypt.createCipherTransform(num, gen));
|
||||
} else {
|
||||
xrefEntry = parser.getObj();
|
||||
}
|
||||
xrefEntry =
|
||||
this.encrypt && !suppressEncryption
|
||||
? parser.getObj(this.encrypt.createCipherTransform(num, gen))
|
||||
: parser.getObj();
|
||||
if (!(xrefEntry instanceof BaseStream)) {
|
||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
|
||||
assert(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue