diff --git a/mithril.js b/mithril.js index d023ac34..ce4f1951 100644 --- a/mithril.js +++ b/mithril.js @@ -736,7 +736,7 @@ var unloaders = [] function updateLists(views, controllers, view, controller) { - if (controller.onunload != null) { + if (controller.onunload != null && unloaders.map(function(u) {return u.handler}).indexOf(controller.onunload) < 0) { unloaders.push({ controller: controller, handler: controller.onunload