diff --git a/mithril.js b/mithril.js index f92faa45..5ac1ca34 100644 --- a/mithril.js +++ b/mithril.js @@ -229,7 +229,7 @@ var m = (function app(window, undefined) { if (cached.configContext && isFunction(cached.configContext.onunload)) cached.configContext.onunload(); if (cached.controllers) { forEach(cached.controllers, function (controller) { - if (controller.unload) controller.onunload({preventDefault: noop}); + if (controller.onunload) controller.onunload({preventDefault: noop}); }); } }