Skip to content

Commit d343889

Browse files
committed
fix: remove redundant optional chaining in toString call
The null check on line 282 already ensures issueNumberValue is not null, so the optional chaining operators on toString() and trim() are unnecessary. As noted by Copilot code review.
1 parent 48733e5 commit d343889

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/scripts/remove-rca-needed-label-sheets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ async function fetchRcaResponses(sheets: SheetsV4): Promise<RcaFormResponse[]> {
282282
if (issueNumberValue != null) {
283283
// Extract just the numeric part from the issue number
284284
// Handles formats like: "18454", "#18454", or leading/trailing whitespace
285-
const trimmedValue = issueNumberValue?.toString()?.trim();
285+
const trimmedValue = issueNumberValue.toString().trim();
286286
if (!trimmedValue) {
287287
continue; // Skip if empty string after trimming
288288
}

0 commit comments

Comments
 (0)