Fixed context when calling a module view during redraw.

This commit is contained in:
Andreas 2015-01-29 22:38:03 +07:00
parent 05831d98c7
commit 5080db017f

View file

@ -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