mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 03:56:15 -08:00
fix(category): handle empty categoryIds in visibility update
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user