Skip to content

Commit 49a525b

Browse files
committed
[Button] Defend against classes sometimes being set to undefined. Issue #91
1 parent 77876d7 commit 49a525b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/lemon-otters-smash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte-ux': patch
3+
---
4+
5+
[Button] Defend against `classes` sometimes being set to `undefined`. Issue #91

src/lib/components/Button.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
none: {},
232232
}[variant ?? 'none']?.[color ?? 'default'],
233233
theme.root,
234-
classes.root,
234+
classes?.root,
235235
$$props.class
236236
);
237237
</script>

0 commit comments

Comments
 (0)