From c7a50c7adab8b10b477c0544595c37d07e617260 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 21 Mar 2024 15:02:14 +0800 Subject: [PATCH] clear the task when it fails to create --- src/libs/actions/Task.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libs/actions/Task.ts b/src/libs/actions/Task.ts index 681ed0ec383f..528264307dba 100644 --- a/src/libs/actions/Task.ts +++ b/src/libs/actions/Task.ts @@ -191,16 +191,12 @@ function createTaskAndNavigate( { onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT}${optimisticTaskReport.reportID}`, - value: { - errorFields: { - createTask: ErrorUtils.getMicroSecondOnyxError('task.genericCreateTaskFailureMessage'), - }, - }, + value: null, }, { onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${optimisticTaskReport.reportID}`, - value: {[optimisticTaskCreatedAction.reportActionID]: {pendingAction: null}}, + value: null, }, ];