[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:
parent
f0468a9173
commit
5e237938ff
2 changed files with 5 additions and 2 deletions
|
|
@ -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}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue