diff --git a/src/runtime/internal/keyed-each.ts b/src/runtime/internal/keyed-each.ts index 33a5f4d1a6..b8e5a1a702 100644 --- a/src/runtime/internal/keyed-each.ts +++ b/src/runtime/internal/keyed-each.ts @@ -1,13 +1,17 @@ import { transition_in, transition_out } from './transitions'; +export function remove_block_from_lookup(block, lookup) { + lookup.delete(block.key); +} + export function destroy_block(block, lookup) { block.d(1); - lookup.delete(block.key); + remove_block_from_lookup(block, lookup); } export function outro_and_destroy_block(block, lookup) { transition_out(block, 1, () => { - destroy_block(block, lookup); + remove_block_from_lookup(block, lookup); }); }