From 7e3c4c783cf8775f044fa479cc3ec6b53c8562ff Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Wed, 21 Oct 2026 16:39:29 +0100 Subject: [PATCH] Simplify `getDisplayActionName` --- lib/entry-points.js | 5 +---- src/status-report.ts | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 98c7f0488..44d5e60a8 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -171435,10 +171435,7 @@ var ACTION_DISPLAY_NAMES = { }; function getDisplayActionName(actionName) { const displayName = ACTION_DISPLAY_NAMES[actionName]; - if (displayName !== void 0) { - return displayName; - } - return actionName; + return displayName ?? actionName; } function getJobUUID(action) { const existingJobRunUuid = action.env.getOptional("CODEQL_ACTION_JOB_RUN_UUID" /* JOB_RUN_UUID */); diff --git a/src/status-report.ts b/src/status-report.ts index 9420aa2a1..49f3c8890 100644 --- a/src/status-report.ts +++ b/src/status-report.ts @@ -74,10 +74,7 @@ export const ACTION_DISPLAY_NAMES: Partial> = { export function getDisplayActionName(actionName: ActionName): string { const displayName = ACTION_DISPLAY_NAMES[actionName]; - if (displayName !== undefined) { - return displayName; - } - return actionName; + return displayName ?? actionName; } /**