diff --git a/src/compiler/compile/render_dom/wrappers/shared/add_actions.ts b/src/compiler/compile/render_dom/wrappers/shared/add_actions.ts index 7c0c6252a3..6ca7de9a22 100644 --- a/src/compiler/compile/render_dom/wrappers/shared/add_actions.ts +++ b/src/compiler/compile/render_dom/wrappers/shared/add_actions.ts @@ -26,13 +26,13 @@ export function add_action(block: Block, target: string, action: Action) { block.add_variable(id); - const [obj, ...property] = action.name.split('.'); + const [obj, ...properties] = action.name.split('.'); const fn = block.renderer.reference(obj); - if (property.length) { + if (properties.length) { block.event_listeners.push( - x`@action_destroyer(${id} = ${fn}.${property.join('.')}(${target}, ${snippet}))` + x`@action_destroyer(${id} = ${fn}.${properties.join('.')}(${target}, ${snippet}))` ); } else { block.event_listeners.push(