Replace some ternary operators with optional chaining, and nullish coalescing, in the src/display/-folder

This way, we can further reduce unnecessary code-repetition in some cases.
This commit is contained in:
Jonas Jenwald 2021-01-19 16:28:47 +01:00
parent 172abc02e1
commit 298ee5cfbb
7 changed files with 8 additions and 14 deletions

View file

@ -69,7 +69,7 @@ class PDFNodeStream {
}
get _progressiveDataLength() {
return this._fullRequestReader ? this._fullRequestReader._loaded : 0;
return this._fullRequestReader?._loaded ?? 0;
}
getFullReader() {