From 1da116bbd3c33f31955d356bfaf41111f1d8762d Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Mon, 9 Jun 2014 16:14:17 -0400 Subject: [PATCH] ignore redraw if called without valid controller --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index 947bcc9e..7cf1c952 100644 --- a/mithril.js +++ b/mithril.js @@ -260,7 +260,7 @@ Mithril = m = new function app(window) { } function redraw() { 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) { computePostRedrawHook()