From 4f07a27df74775e35775d34e800abfd683c5fa86 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sat, 17 Feb 2024 21:50:17 -0800
Subject: feat(badges): optionally hide missing badges

---
 src/lib/FallbackImage.svelte | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/lib/FallbackImage.svelte')

diff --git a/src/lib/FallbackImage.svelte b/src/lib/FallbackImage.svelte
index 4a53698d..0ea49c6c 100644
--- a/src/lib/FallbackImage.svelte
+++ b/src/lib/FallbackImage.svelte
@@ -5,6 +5,7 @@
 	export let maxReplaceCount = 1;
 	export let replaceDelay = 1000;
 	export let error = 'https://i2.kym-cdn.com/photos/images/newsfeed/000/290/992/0aa.jpg';
+	export let hideOnError = false;
 
 	let replaceCount = 0;
 
@@ -27,7 +28,7 @@
 		class="badge"
 		on:error={(e) => delayedReplace(e, fallback)}
 	/>
-{:else}
+{:else if !hideOnError}
 	<img src={error} alt="Not found" loading="lazy" class="badge" />
 {/if}
 
-- 
cgit v1.2.3

