[WEB-6783] fix: crash when deleting work item from peek view in workspace spreadsheet (#8821)

* fix: guard against undefined issue in SpreadsheetIssueRow

* fix: add defensive guard for isIssueNew in list block-root
This commit is contained in:
Anmol Singh Bhatia 2026-03-30 12:20:39 +05:30 committed by GitHub
parent f0468a9173
commit 5e237938ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -138,7 +138,7 @@ export const IssueBlockRoot = observer(function IssueBlockRoot(props: Props) {
root={containerRef}
classNames={`relative ${isLastChild && !isExpanded ? "" : "border-b border-b-subtle"}`}
verticalOffset={100}
defaultValue={shouldRenderByDefault || isIssueNew(issuesMap[issueId])}
defaultValue={shouldRenderByDefault || (issuesMap[issueId] ? isIssueNew(issuesMap[issueId]) : false)}
placeholderChildren={<ListLoaderItemRow shouldAnimate={false} renderForPlaceHolder defaultPropertyCount={4} />}
shouldRecordHeights={isMobile}
>

View file

@ -81,10 +81,13 @@ export const SpreadsheetIssueRow = observer(function SpreadsheetIssueRow(props:
const { issueMap } = useIssues();
// derived values
const issue = issueMap[issueId];
const subIssues = subIssuesStore.subIssuesByIssueId(issueId);
const isIssueSelected = selectionHelpers.getIsEntitySelected(issueId);
const isIssueActive = selectionHelpers.getIsEntityActive(issueId);
if (!issue) return null;
return (
<>
{/* first column/ issue name and key column */}
@ -104,7 +107,7 @@ export const SpreadsheetIssueRow = observer(function SpreadsheetIssueRow(props:
})}
verticalOffset={100}
shouldRecordHeights={false}
defaultValue={shouldRenderByDefault || isIssueNew(issueMap[issueId])}
defaultValue={shouldRenderByDefault || isIssueNew(issue)}
>
<IssueRowDetails
issueId={issueId}