forked from github/plane
optionally chain sub issue count (#4585)
This commit is contained in:
parent
c7996544b4
commit
f0ece1c6b7
@ -68,7 +68,7 @@ export const IssueBlock = observer((props: IssueBlockProps) => {
|
||||
setPeekIssue({ workspaceSlug, projectId: issue.project_id, issueId: issue.id, nestingLevel: nestingLevel });
|
||||
|
||||
const issue = issuesMap[issueId];
|
||||
const subIssuesCount = issue.sub_issues_count;
|
||||
const subIssuesCount = issue?.sub_issues_count ?? 0;
|
||||
|
||||
const { isMobile } = usePlatformOS();
|
||||
|
||||
|
@ -63,7 +63,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
|
||||
const currentLayout = `${activeLayout} layout`;
|
||||
// derived values
|
||||
const stateDetails = getStateById(issue.state_id);
|
||||
const subIssueCount = issue.sub_issues_count;
|
||||
const subIssueCount = issue?.sub_issues_count ?? 0;
|
||||
|
||||
const issueOperations = useMemo(
|
||||
() => ({
|
||||
|
@ -19,7 +19,7 @@ export const SpreadsheetSubIssueColumn: React.FC<Props> = observer((props: Props
|
||||
// hooks
|
||||
const { workspaceSlug } = useAppRouter();
|
||||
// derived values
|
||||
const subIssueCount = issue.sub_issues_count;
|
||||
const subIssueCount = issue?.sub_issues_count ?? 0;
|
||||
|
||||
const redirectToIssueDetail = () => {
|
||||
router.push({
|
||||
|
@ -203,7 +203,7 @@ const IssueRowDetails = observer((props: IssueRowDetailsProps) => {
|
||||
};
|
||||
|
||||
const disableUserActions = !canEditProperties(issueDetail.project_id);
|
||||
const subIssuesCount = issueDetail.sub_issues_count;
|
||||
const subIssuesCount = issueDetail?.sub_issues_count ?? 0;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -61,7 +61,7 @@ export const IssueListItem: React.FC<ISubIssues> = observer((props) => {
|
||||
undefined;
|
||||
|
||||
const subIssueHelpers = subIssueHelpersByIssueId(parentIssueId);
|
||||
const subIssueCount = issue?.sub_issues_count || 0;
|
||||
const subIssueCount = issue?.sub_issues_count ?? 0;
|
||||
|
||||
const handleIssuePeekOverview = (issue: TIssue) =>
|
||||
workspaceSlug &&
|
||||
|
Loading…
Reference in New Issue
Block a user