From 4e57c178d1a346ac5e3a8182798f244959d79b1c Mon Sep 17 00:00:00 2001 From: Roji Philip Date: Thu, 1 Feb 2024 23:41:58 +0530 Subject: [PATCH] fix for invalid tast title in lhn --- src/libs/TaskUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/TaskUtils.ts b/src/libs/TaskUtils.ts index da2727d29942..623d449db885 100644 --- a/src/libs/TaskUtils.ts +++ b/src/libs/TaskUtils.ts @@ -46,7 +46,7 @@ function getTaskTitle(taskReportID: string, fallbackTitle = ''): string { function getTaskCreatedMessage(reportAction: OnyxEntry) { const taskReportID = reportAction?.childReportID ?? ''; const taskTitle = getTaskTitle(taskReportID, reportAction?.childReportName); - return Localize.translateLocal('task.messages.created', {title: taskTitle}); + return taskTitle ? Localize.translateLocal('task.messages.created', {title: taskTitle}) : ''; } export {getTaskReportActionMessage, getTaskTitle, getTaskCreatedMessage};