fix(category): handle empty categoryIds in visibility update

This commit is contained in:
4gray committed 2026-01-07 20:40:45 +01:00
1 parent 529b53c66c
commit 2c3c979a96
1 file changed
+3
@@ -104,6 +104,9 @@ ipcMain.handle(
'DB_UPDATE_CATEGORY_VISIBILITY',
async (event, categoryIds: number[], hidden: boolean) => {
try {
if (categoryIds.length === 0) {
return { success: true };
}
const db = await getDatabase();
await db
.update(schema.categories)