From a1e39d1e07046e5c1117e65970e9acc5f70b793c Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 8 Aug 2023 21:04:50 +0700 Subject: [PATCH] fix error when assign totalnew person --- src/libs/actions/Task.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 36eabd05cece..595aa0d11a89 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -380,9 +380,9 @@ function editTaskAndNavigate(report, ownerAccountID, {title, description, assign let optimisticAssigneeAddComment; let assigneeChatReportID; if (assigneeAccountID && assigneeAccountID !== report.managerID && assigneeAccountID !== ownerAccountID) { - assigneeChatReportID = ReportUtils.getChatByParticipants([assigneeAccountID]).reportID; + assigneeChatReportID = lodashGet(ReportUtils.getChatByParticipants([assigneeAccountID]), ['reportID'], undefined); - if (assigneeChatReportID !== report.parentReportID.toString()) { + if (assigneeChatReportID && assigneeChatReportID !== report.parentReportID.toString()) { optimisticAssigneeAddComment = ReportUtils.buildOptimisticTaskCommentReportAction( report.reportID, reportName,