Cleanup: Use optional chaining in a couple of places
This commit is contained in:
parent
b316baae94
commit
b45ac1f8f8
3 changed files with 5 additions and 5 deletions
4
lib/analyze-action.js
generated
4
lib/analyze-action.js
generated
|
|
@ -145,7 +145,7 @@ async function run() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (config !== undefined && config.debugMode) {
|
if (config === null || config === void 0 ? void 0 : config.debugMode) {
|
||||||
try {
|
try {
|
||||||
// Upload the database bundles as an Actions artifact for debugging
|
// Upload the database bundles as an Actions artifact for debugging
|
||||||
const toUpload = [];
|
const toUpload = [];
|
||||||
|
|
@ -158,7 +158,7 @@ async function run() {
|
||||||
console.log(`Failed to upload database debug bundles: ${error}`);
|
console.log(`Failed to upload database debug bundles: ${error}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config !== undefined && config.debugMode) {
|
if (config === null || config === void 0 ? void 0 : config.debugMode) {
|
||||||
core.info("Debug mode is on. Printing CodeQL debug logs...");
|
core.info("Debug mode is on. Printing CodeQL debug logs...");
|
||||||
for (const language of config.languages) {
|
for (const language of config.languages) {
|
||||||
const databaseDirectory = util.getCodeQLDatabasePath(config, language);
|
const databaseDirectory = util.getCodeQLDatabasePath(config, language);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -236,7 +236,7 @@ async function run() {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
if (config !== undefined && config.debugMode) {
|
if (config?.debugMode) {
|
||||||
try {
|
try {
|
||||||
// Upload the database bundles as an Actions artifact for debugging
|
// Upload the database bundles as an Actions artifact for debugging
|
||||||
const toUpload: string[] = [];
|
const toUpload: string[] = [];
|
||||||
|
|
@ -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...");
|
core.info("Debug mode is on. Printing CodeQL debug logs...");
|
||||||
for (const language of config.languages) {
|
for (const language of config.languages) {
|
||||||
const databaseDirectory = util.getCodeQLDatabasePath(config, language);
|
const databaseDirectory = util.getCodeQLDatabasePath(config, language);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue