Skip to content

Commit

Permalink
client-side: added missing return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
MartkCz committed Aug 5, 2016
1 parent 4d68aea commit 3667853
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,19 @@ var _tmp = (function ($, undefined) {
addControl: function (name, object) {
if (!helpers.isObject(object)) {
this.printError(name + ' must be object.');
return;
}
if (!helpers.hasMethod(object, 'init')) {
this.printError(name + ' must have init function.');
return;
}
if (!helpers.hasMethod(object, 'load')) {
this.printError(name + ' must have load function.');
return;
}
if (!helpers.hasMethod(object, 'isEnabled')) {
this.printError(name + ' must have isEnabled function.');
return;
}
this.controls[name] = object;
}
Expand Down
4 changes: 4 additions & 0 deletions dist/form.controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,19 @@ var _tmp = (function ($, undefined) {
addControl: function (name, object) {
if (!helpers.isObject(object)) {
this.printError(name + ' must be object.');
return;
}
if (!helpers.hasMethod(object, 'init')) {
this.printError(name + ' must have init function.');
return;
}
if (!helpers.hasMethod(object, 'load')) {
this.printError(name + ' must have load function.');
return;
}
if (!helpers.hasMethod(object, 'isEnabled')) {
this.printError(name + ' must have isEnabled function.');
return;
}
this.controls[name] = object;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/form.controls.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3667853

Please sign in to comment.