pull/12642/head
Rich Harris 2 years ago
parent 9eefe34b2a
commit 1c9d69fa27

@ -3049,11 +3049,9 @@ export const template_visitors = {
call_expr = b.call(`$.bind_focused`, state.node, setter); call_expr = b.call(`$.bind_focused`, state.node, setter);
break; break;
case 'group': { case 'group': {
/** @type {CallExpression[]} */ const indexes = node.metadata.parent_each_blocks.map((each) => {
const indexes = []; return b.call('$.unwrap', each.metadata.index);
for (const parent_each_block of node.metadata.parent_each_blocks) { });
indexes.push(b.call('$.unwrap', parent_each_block.metadata.index));
}
// We need to additionally invoke the value attribute signal to register it as a dependency, // We need to additionally invoke the value attribute signal to register it as a dependency,
// so that when the value is updated, the group binding is updated // so that when the value is updated, the group binding is updated

@ -73,13 +73,8 @@ export function bind_group(inputs, group_index, input, get_value, update) {
if (group_index !== null) { if (group_index !== null) {
for (var index of group_index) { for (var index of group_index) {
var group = binding_group; // @ts-expect-error
// @ts-ignore binding_group = binding_group[index] ??= [];
binding_group = group[index];
if (binding_group === undefined) {
// @ts-ignore
binding_group = group[index] = [];
}
} }
} }

Loading…
Cancel
Save