diff --git a/packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js b/packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js index 84458993905e..e5302a3a7c3b 100644 --- a/packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js +++ b/packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js @@ -2344,7 +2344,8 @@ export const template_visitors = { each_type |= EACH_IS_STRICT_EQUALS; } - // If the array is a store expression, we need to invalidate it when the array is changed + // If the array is a store expression, we need to invalidate it when the array is changed. + // This doesn't catch all cases, but all the ones that Svelte 4 catches, too. let store_to_invalidate = ''; if (node.expression.type === 'Identifier' || node.expression.type === 'MemberExpression') { const id = object(node.expression);