Enable tsconfig noUncheckedIndexedAccess

This commit is contained in:
Jamie
2026-03-12 16:24:01 -07:00
committed by GitHub
parent 34b0f9cd50
commit 1d45a52da7
311 changed files with 2146 additions and 1589 deletions

View File

@@ -75,7 +75,7 @@ export function PollCreateModal({
const isLastOption = changedIndex === resultOptions.length - 1;
const isSecondToLast = changedIndex === resultOptions.length - 2;
const changedOption = resultOptions[changedIndex];
const hasText = changedOption?.value.trim().length > 0;
const hasText = (changedOption?.value.trim().length ?? 0) > 0;
const canAddMore = resultOptions.length < POLL_OPTIONS_MAX_COUNT;
const canRemove = resultOptions.length > POLL_OPTIONS_MIN_COUNT;
let removedIndex: number | undefined;