ignore redraw if called without valid controller

This commit is contained in:
Leo Horie 2014-06-09 16:14:17 -04:00
parent 55514c3557
commit 1da116bbd3

View file

@ -260,7 +260,7 @@ Mithril = m = new function app(window) {
} }
function redraw() { function redraw() {
for (var i = 0; i < roots.length; i++) { for (var i = 0; i < roots.length; i++) {
m.render(roots[i], modules[i].view(controllers[i])) if (controllers[i]) m.render(roots[i], modules[i].view(controllers[i]))
} }
if (computePostRedrawHook) { if (computePostRedrawHook) {
computePostRedrawHook() computePostRedrawHook()