mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Introduce even more modern JavaScript features in the code-base
After PR 12563 we're now free to use e.g. logical OR assignment, nullish coalescing, and optional chaining in the entire code-base.
This commit is contained in:
parent
a24d5b629e
commit
e8030752f3
10 changed files with 25 additions and 31 deletions
|
@ -371,7 +371,7 @@ class Field extends PDFObject {
|
|||
nIdx = Array.isArray(this._currentValueIndices)
|
||||
? this._currentValueIndices[0]
|
||||
: this._currentValueIndices;
|
||||
nIdx = nIdx || 0;
|
||||
nIdx ||= 0;
|
||||
}
|
||||
|
||||
if (nIdx < 0 || nIdx >= this.numItems) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue