Skip to content

Commit 4e2e89f

Browse files
committed
should always display errors if we have errors
1 parent 8ca391b commit 4e2e89f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/pages/settings/Agents/AgentsPage.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ function AgentsPage() {
6565
}
6666
};
6767

68-
const shouldShowErrors = (pendingAction: PendingAction | null | undefined) =>
69-
pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD || pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
70-
7168
const agents: AgentRowData[] = Object.entries(agentPrompts ?? {}).flatMap(([key, agentPrompt]) => {
7269
const accountID = Number(key.slice(ONYXKEYS.COLLECTION.SHARED_NVP_AGENT_PROMPT.length));
7370
const details = personalDetailsList?.[accountID];
@@ -82,7 +79,7 @@ function AgentsPage() {
8279
}
8380

8481
const mergedErrors = {
85-
...(shouldShowErrors(pendingAction) ? getLatestError(agentPrompt?.errors ?? undefined) : {}),
82+
...getLatestError(agentPrompt?.errors ?? undefined),
8683
...getLatestError(agentPrompt?.nameErrors ?? undefined),
8784
...getLatestError(agentPrompt?.promptErrors ?? undefined),
8885
...getLatestError(agentPrompt?.avatarErrors ?? undefined),

0 commit comments

Comments
 (0)