From d562acf61f64a2a8a878c0ecf34f003007d6939b Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sun, 29 Sep 2024 04:28:22 +0530 Subject: [PATCH] fix: Categories - RBR appears next to workspace after selecting the deleted spend category offline. Signed-off-by: krishna2323 --- .../workspace/categories/WorkspaceCategoriesSettingsPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx index 5a048e3bdc36..508b7b417b58 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx @@ -69,7 +69,7 @@ function WorkspaceCategoriesSettingsPage({policy, route}: WorkspaceCategoriesSet const isToggleDisabled = !policy?.areCategoriesEnabled || !hasEnabledOptions || isConnectedToAccounting; const setNewCategory = (selectedCategory: ListItem) => { - if (!selectedCategory.keyForList || !groupID) { + if (!selectedCategory.keyForList || !groupID || categoryID === selectedCategory.keyForList) { return; } Policy.setWorkspaceDefaultSpendCategory(policyID, groupID, selectedCategory.keyForList);