From 5080db017fc6c9bca1ce671e5b99a0a396bcb79f Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 29 Jan 2015 22:38:03 +0700 Subject: [PATCH] Fixed context when calling a module view during redraw. --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index f1da83f6..9c08b826 100644 --- a/mithril.js +++ b/mithril.js @@ -542,7 +542,7 @@ var m = (function app(window, undefined) { var forceRedraw = m.redraw.strategy() === "all"; for (var i = 0, root; root = roots[i]; i++) { if (controllers[i]) { - m.render(root, (modules[i].view || blank)(controllers[i]), forceRedraw) + m.render(root, modules[i].view ? modules[i].view(controllers[i]) : blank(), forceRedraw) } } //after rendering within a routed context, we need to scroll back to the top, and fetch the document title for history.pushState