diff --git a/src/compiler/compile/render_dom/wrappers/EachBlock.ts b/src/compiler/compile/render_dom/wrappers/EachBlock.ts index c8fdae54a2..a0a08fca0c 100644 --- a/src/compiler/compile/render_dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/EachBlock.ts @@ -121,7 +121,11 @@ export default class EachBlockWrapper extends Wrapper { view_length: fixed_length === null ? `${iterations}.[✂${c}-${c+4}✂]` : fixed_length }; - const store = node.expression.node.name[0] === '$' ? node.expression.node.name.slice(1) : null; + const store = + node.expression.node.type === 'Identifier' && + node.expression.node.name[0] === '$' + ? node.expression.node.name.slice(1) + : null; node.contexts.forEach(prop => { this.block.bindings.set(prop.key.name, {