Skip to content

Commit b45ac1f

Browse files
committed
Cleanup: Use optional chaining in a couple of places
1 parent b316baa commit b45ac1f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/analyze-action.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze-action.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ async function run() {
236236

237237
return;
238238
} finally {
239-
if (config !== undefined && config.debugMode) {
239+
if (config?.debugMode) {
240240
try {
241241
// Upload the database bundles as an Actions artifact for debugging
242242
const toUpload: string[] = [];
@@ -260,7 +260,7 @@ async function run() {
260260
}
261261
}
262262

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

0 commit comments

Comments
 (0)