fixes sveltejs/svelte#8214 bind:group to undefined

pull/8215/head
David Hunt 4 years ago
parent 967e9f51ff
commit 229422d050

@ -264,7 +264,7 @@ function get_dom_updater(
const type = node.get_static_attribute_value('type');
const condition = type === 'checkbox'
? x`~${binding.snippet}.indexOf(${element.var}.__value)`
? x`~(${binding.snippet} ?? [])?.indexOf(${element.var}.__value)`
: x`${element.var}.__value === ${binding.snippet}`;
return b`${element.var}.checked = ${condition};`;

Loading…
Cancel
Save