Skip to content

Commit

Permalink
fix: Categories - RBR appears next to workspace after selecting the d…
Browse files Browse the repository at this point in the history
…eleted spend category offline.

Signed-off-by: krishna2323 <[email protected]>
  • Loading branch information
Krishna2323 committed Sep 28, 2024
1 parent 3047c1b commit d562acf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d562acf

Please sign in to comment.