Check for constructor before trying to load module JS
This commit is contained in:
parent
e28f7a05eb
commit
c846c7c3f8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue