Skip to content

Commit 11692c8

Browse files
fix: remove redundant undefined check in urgencyLabel (#90)
The parameter type is number | null, so undefined is impossible. Simplify to == null (covers both) to resolve CodeQL code quality finding js/unneeded-defensive-code.
1 parent 52a9042 commit 11692c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/generator/src/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ function mergeExplanationTraces(
296296
// ── Urgency label from score ─────────────────────────────────────────
297297

298298
function urgencyLabel(score: number | null): string | null {
299-
if (score === null || score === undefined) return null;
299+
if (score == null) return null;
300300
if (score >= 90) return "urgent";
301301
if (score >= 70) return "important";
302302
if (score >= 40) return "standard";

0 commit comments

Comments
 (0)