tweak button handler; check if disabled first

This commit is contained in:
ari melody 2024-07-02 12:40:39 +01:00
parent ef9f12d0fd
commit e80b6e7104
Signed by: ari
GPG key ID: CF99829C92678188

View file

@ -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');
}