1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Add more optional chaining in the test/ directory

This commit is contained in:
Jonas Jenwald 2024-09-22 13:00:57 +02:00
parent 0a621ba73a
commit 1a1dfe60bf
2 changed files with 2 additions and 2 deletions

View file

@ -782,7 +782,7 @@ class Driver {
}
}
if (task.skipPages && task.skipPages.includes(task.pageNum)) {
if (task.skipPages?.includes(task.pageNum)) {
this._log(
" Skipping page " + task.pageNum + "/" + task.pdfDoc.numPages + "...\n"
);

View file

@ -161,7 +161,7 @@ function parseOptions() {
);
})
.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.");
}
return true;