Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Commit 9fe0fa3

Browse files
DinCahillFlorian-Schoenherr
authored andcommitted
fix(ItemGroup): check for index
1 parent be16ead commit 9fe0fa3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/svelte-materialify/src/components/ItemGroup/ItemGroup.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
} else if (value.length < max) value = [...value, val];
3434
} else if (value === val) {
3535
if (!mandatory) value = null;
36-
} else value = val;
36+
} else if (typeof (val) === 'number') {
37+
value = val;
38+
} else value = [val];
3739
},
3840
register: (setValue) => {
3941
const u = valueStore.subscribe((val) => {

0 commit comments

Comments
 (0)