From faf1eeea2fcad4f3c84ce79e7d58ebc5089a9e56 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 5 Aug 2017 22:21:15 -0400 Subject: [PATCH] no need to bind destroy, event handlers are called with the component as context --- src/generators/dom/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts index ff8bcf8949..091ec685df 100644 --- a/src/generators/dom/index.ts +++ b/src/generators/dom/index.ts @@ -207,7 +207,7 @@ export default function dom( }; this._handlers = Object.create( null ); - ${templateProperties.ondestroy && `this._handlers.destroy = [@template.ondestroy.bind(this)]`} + ${templateProperties.ondestroy && `this._handlers.destroy = [@template.ondestroy]`} this._root = options._root || this; this._yield = options._yield;