Skip to content

Commit

Permalink
Add more optional chaining in the test/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffleupagus committed Sep 22, 2024
1 parent 0a621ba commit 1a1dfe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
Expand Down
2 changes: 1 addition & 1 deletion test/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1a1dfe6

Please sign in to comment.