From c846c7c3f85600549cc900806c508fa467af70ce Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 26 Mar 2014 09:25:31 +0000 Subject: [PATCH] Check for constructor before trying to load module JS --- public/js/icinga/module.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/js/icinga/module.js b/public/js/icinga/module.js index f9ae3d69b..f43ce1a6f 100644 --- a/public/js/icinga/module.js +++ b/public/js/icinga/module.js @@ -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