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};