mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 14:24:41 +02:00
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…
x
Reference in New Issue
Block a user