Check for constructor before trying to load module JS

This commit is contained in:
Thomas Gelf 2014-03-26 09:25:31 +00:00
parent e28f7a05eb
commit c846c7c3f8
1 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,13 @@
initialize: function () {
if (typeof this.prototyp !== 'function') {
this.icinga.logger.error(
'Unable to load module "' + this.name + '", constructor is missing'
);
return false;
}
try {
// The constructor of the modules prototype must be prepared to get an