mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-27 17:37:22 +02:00
Add more optional chaining in the test/ directory
This commit is contained in:
parent
0a621ba73a
commit
1a1dfe60bf
@ -782,7 +782,7 @@ class Driver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.skipPages && task.skipPages.includes(task.pageNum)) {
|
if (task.skipPages?.includes(task.pageNum)) {
|
||||||
this._log(
|
this._log(
|
||||||
" Skipping page " + task.pageNum + "/" + task.pdfDoc.numPages + "...\n"
|
" Skipping page " + task.pageNum + "/" + task.pdfDoc.numPages + "...\n"
|
||||||
);
|
);
|
||||||
|
|||||||
@ -161,7 +161,7 @@ function parseOptions() {
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
.check(argv => {
|
.check(argv => {
|
||||||
if (argv.testfilter && argv.testfilter.length > 0 && argv.xfaOnly) {
|
if (argv.testfilter?.length > 0 && argv.xfaOnly) {
|
||||||
throw new Error("--testfilter and --xfaOnly cannot be used together.");
|
throw new Error("--testfilter and --xfaOnly cannot be used together.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user