mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Shorten some if
-statements in the src/core/
folder
Thanks to modern JavaScript there's some existing code that can be shortened slightly.
This commit is contained in:
parent
4547f230ba
commit
3a797317c8
6 changed files with 16 additions and 26 deletions
|
@ -466,7 +466,7 @@ const blackTable3 = [
|
|||
*/
|
||||
class CCITTFaxDecoder {
|
||||
constructor(source, options = {}) {
|
||||
if (!source || typeof source.next !== "function") {
|
||||
if (typeof source?.next !== "function") {
|
||||
throw new Error('CCITTFaxDecoder - invalid "source" parameter.');
|
||||
}
|
||||
this.source = source;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue