Skip to content
Permalink
Browse files

bugfix 'cannot read property meta of undefined' in module initialization

  • Loading branch information...
Niels Roche
Niels Roche committed Apr 13, 2016
1 parent 3d3f647 commit 1d3cb82fe7b15fbb5a3dff127282afcd7c7e5883
Showing with 17 additions and 9 deletions.
  1. +17 −9 classes/AutomationController.js
@@ -734,18 +734,26 @@ AutomationController.prototype.instantiateModules = function () {

// first instantiate all required modules without dependencies
requiredBaseModules.forEach(function(mod) {
if (this.modules[mod].meta &&
this.modules[mod].meta.dependencies &&
_.isArray(this.modules[mod].meta.dependencies) &&
this.modules[mod].meta.dependencies.length > 0) {

// cache required modules with dependencies
if (requiredWithDep.indexOf(mod) < 0){
requiredWithDep.push(mod);
if (this.modules[mod]) {

// prepare base modules with dependencies
if (this.modules[mod].meta &&
this.modules[mod].meta.dependencies &&
_.isArray(this.modules[mod].meta.dependencies) &&
this.modules[mod].meta.dependencies.length > 0) {

// cache required modules with dependencies
if (requiredWithDep.indexOf(mod) < 0){
requiredWithDep.push(mod);
}
} else {
// load base modules without dependencies first
this.loadModule(this.modules[mod]);
}
} else {
this.loadModule(this.modules[mod]);
this.addNotification("error", langFile.ac_err_init_module_not_found + " : " + mod, "core", "AutomationController");
}

}, this);

// instantiate all required with dependencies

1 comment on commit 1d3cb82

@mikerobski

This comment has been minimized.

Copy link

mikerobski commented on 1d3cb82 Apr 27, 2016

Looks like langFile on line 754 is not defined. I had to remove the localization to get this to work.

Please sign in to comment.
You can’t perform that action at this time.