prevent null ref
This commit is contained in:
parent
3894ec683c
commit
6040a4dc67
1 changed files with 1 additions and 1 deletions
|
|
@ -557,7 +557,7 @@ var m = (function app(window, undefined) {
|
||||||
var controller = function() {
|
var controller = function() {
|
||||||
return (component.controller || noop).apply(this, args) || this;
|
return (component.controller || noop).apply(this, args) || this;
|
||||||
};
|
};
|
||||||
controller.prototype = component.controller.prototype
|
if (component.controller) controller.prototype = component.controller.prototype
|
||||||
var view = function(ctrl) {
|
var view = function(ctrl) {
|
||||||
if (arguments.length > 1) args = args.concat([].slice.call(arguments, 1));
|
if (arguments.length > 1) args = args.concat([].slice.call(arguments, 1));
|
||||||
return component.view.apply(component, args ? [ctrl].concat(args) : [ctrl]);
|
return component.view.apply(component, args ? [ctrl].concat(args) : [ctrl]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue