Skip to content

A local-first personal finance app

Do not allow renaming to an empty category or group name (#3463)

Joel Jeremy Marquez37d391b4fc58
diff --git a/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx b/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx
index b79d4667d1..abdcba1fd9 100644
--- a/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx
+++ b/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx
@@ -45,7 +45,7 @@ export function CategoryGroupMenuModal({
const notes = useNotes(group.id);
const onRename = newName => {
- if (newName !== group.name) {
+ if (newName && newName !== group.name) {
onSave?.({
...group,
name: newName,
diff --git a/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx b/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx
index e17f43edb8..721759fcad 100644
--- a/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx
+++ b/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx
@@ -43,7 +43,7 @@ export function CategoryMenuModal({
const originalNotes = useNotes(category.id);
const onRename = newName => {
- if (newName !== category.name) {
+ if (newName && newName !== category.name) {
onSave?.({
...category,
name: newName,
diff --git a/upcoming-release-notes/3463.md b/upcoming-release-notes/3463.md
new file mode 100644
index 0000000000..e0b7480280
--- /dev/null
+++ b/upcoming-release-notes/3463.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [joel-jeremy]
+---
+
+Mobile - Do not allow renaming category or group to an empty name.