summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorWolfgang Müller2025-03-26 17:40:13 +0100
committerWolfgang Müller2025-03-26 17:40:13 +0100
commit0da158d0f0cc5bc611441f7cb8b36bb36e485ddd (patch)
treeb982b12134ac98b76fdb4ef3195650ffe52048fe
parentd40249a88074bd00a7049d5effe818617a93ad08 (diff)
downloadhircine-0da158d0f0cc5bc611441f7cb8b36bb36e485ddd.tar.gz
frontend: Don't report undefined comics as pending
This check was missed in the migration to Svelte 5 as we inverted the functionality of the functions checking for pending state. Where previously the functions checked for equality, now they check for inequality, and these two checks were never inverted. This causes hircine to pop up a warning about pending changes when the user is trying to leave a "Comic not found" page.
-rw-r--r--frontend/src/lib/Form.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/lib/Form.ts b/frontend/src/lib/Form.ts
index ab0f4f7..b6d06f4 100644
--- a/frontend/src/lib/Form.ts
+++ b/frontend/src/lib/Form.ts
@@ -53,8 +53,8 @@ export function tagPending(a: OmitIdentifiers<FullTag>, b: OmitIdentifiers<FullT
}
export function comicPending(a?: FullComicFragment, b?: OmitIdentifiers<FullComicFragment>) {
- if (a === undefined) return b === undefined;
- if (b === undefined) return a === undefined;
+ if (a === undefined) return b !== undefined;
+ if (b === undefined) return a !== undefined;
return (
stringPending(a.title, b.title) ||