Skip to content

Commit

Permalink
Cleanup: Use optional chaining in a couple of places
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Mercer committed Jul 12, 2022
1 parent b316baa commit b45ac1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/analyze-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async function run() {

return;
} finally {
if (config !== undefined && config.debugMode) {
if (config?.debugMode) {
try {
// Upload the database bundles as an Actions artifact for debugging
const toUpload: string[] = [];
Expand All @@ -260,7 +260,7 @@ async function run() {
}
}

if (config !== undefined && config.debugMode) {
if (config?.debugMode) {
core.info("Debug mode is on. Printing CodeQL debug logs...");
for (const language of config.languages) {
const databaseDirectory = util.getCodeQLDatabasePath(config, language);
Expand Down

0 comments on commit b45ac1f

Please sign in to comment.