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

* Do not allow renaming to an emoty category or group name

* Release notes
This commit is contained in:
Joel Jeremy Marquez
2024-09-18 06:27:47 -07:00
committed by GitHub
parent 7702ee4f4f
commit 37d391b4fc
3 changed files with 8 additions and 2 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [joel-jeremy]
---
Mobile - Do not allow renaming category or group to an empty name.