From e80b6e71045bdc89cdca445dbd26ed271239e51d Mon Sep 17 00:00:00 2001 From: ari melody Date: Tue, 2 Jul 2024 12:40:39 +0100 Subject: [PATCH] tweak button handler; check if disabled first --- src/lib/ui/Button.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ui/Button.svelte b/src/lib/ui/Button.svelte index 702d3fa..4a7d95e 100644 --- a/src/lib/ui/Button.svelte +++ b/src/lib/ui/Button.svelte @@ -18,11 +18,11 @@ if (centered) classes.push("centered"); function click() { + if (disabled) return; if (href) { location = href; return; } - if (disabled) return; play_sound(sound); dispatch('click'); }