diff --git a/test/driver.js b/test/driver.js index c79c30601380e..8ba30b0bfd3ce 100644 --- a/test/driver.js +++ b/test/driver.js @@ -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" ); diff --git a/test/test.mjs b/test/test.mjs index c6d3ccf44308e..4d16c8ea1e656 100644 --- a/test/test.mjs +++ b/test/test.mjs @@ -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;