fix(plugins): mangabaka never deletes on upsert without entry

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 15:50:32 +01:00
co-authored by Claude Opus 5.5
parent ddd938935e
commit f30c0db2b1
3 changed files with 24 additions and 4 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ export const STATE_MAP: Record<string, Status> = {
};
export function mapState(s: string | null | undefined): Status {
return (s != null && STATE_MAP[s]) || "none";
return s != null && Object.hasOwn(STATE_MAP, s) ? STATE_MAP[s]! : "none";
}
function hint(e: ApiEntry): WorkHint {