aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/users.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/users.ts b/src/utils/users.ts
index efae6d20..15107c99 100644
--- a/src/utils/users.ts
+++ b/src/utils/users.ts
@@ -213,6 +213,8 @@ export const addCategoryToRecentlySearched = async (
);
if (categoriesJSON) {
categories = JSON.parse(categoriesJSON);
+ // TODO: make this more efficient by comparing shorter key
+ if (categories.find((c) => c.name === category.name)) return;
categories.push(category);
} else {
categories = [category];