From 71c880d78d5a7d76b535aace376925acc7bea48f Mon Sep 17 00:00:00 2001 From: Einar Date: Fri, 11 Dec 2015 22:03:49 +0000 Subject: [PATCH] fix hasty error --- mithril.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mithril.js b/mithril.js index 967de22c..2c9de619 100644 --- a/mithril.js +++ b/mithril.js @@ -735,12 +735,12 @@ void (function (global, factory) { // eslint-disable-line var idx = controllers.push(controller) - 1 unloaders[idx] = { controller: controller, - handler: function () { + handler: function (ev) { controllers.splice(controllers.indexOf(controller), 1) views.splice(views.indexOf(view), 1) var unload = controller && controller.onunload if (type.call(unload) === "[object Function]") { - controller.onunload() + controller.onunload(ev) } } }