8 lines
95 B

<script>
export let foo = {};
export let bar;
$: if (bar) {
foo[bar] = true;
}
</script>