From 0da158d0f0cc5bc611441f7cb8b36bb36e485ddd Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Wed, 26 Mar 2025 17:40:13 +0100
Subject: 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.
---
 frontend/src/lib/Form.ts | 4 ++--
 1 file 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) ||
-- 
cgit v1.2.3-2-gb3c3