function() {} -> noop

This commit is contained in:
Redstone Zhao 2015-05-31 09:26:25 +08:00
parent 26a6664cd0
commit 4c1d7892aa

View file

@ -593,7 +593,7 @@ var m = (function app(window, undefined) {
m.startComputation(); m.startComputation();
roots[index] = root; roots[index] = root;
if (arguments.length > 2) component = subcomponent(component, [].slice.call(arguments, 2)) if (arguments.length > 2) component = subcomponent(component, [].slice.call(arguments, 2))
var currentComponent = topComponent = component = component || {controller: function() {}}; var currentComponent = topComponent = component = component || {controller: noop};
var constructor = component.controller || noop var constructor = component.controller || noop
var controller = new constructor; var controller = new constructor;
//controllers may call m.mount recursively (via m.route redirects, for example) //controllers may call m.mount recursively (via m.route redirects, for example)