diff --git a/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts b/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts index c5eaca0f54..03183ee576 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts @@ -30,7 +30,7 @@ export default class EventHandlerWrapper { if (this.node.reassigned) { block.maintain_context = true; - return x`function () { if( @is_function(${snippet}) ) ${snippet}.apply(this, arguments); }`; + return x`function () { if (@is_function(${snippet})) ${snippet}.apply(this, arguments); }`; } return snippet; }