Commit 1d1551e2 authored by marcel's avatar marcel
Browse files

Remove entry point check during extension loading.

parent 3f9a3d63
......@@ -41,20 +41,17 @@ define(["jquery", "emitter", "vispa/module", "vispa/ui"], function($, Emitter, M
var self = this;
this.extensionsLoading++;
// check if the entry point, i.e. the extension.js file, exists
var entryPoint = "extensions/" + name + "/static/js/extension";
$.ajax({ url: entryPoint + ".js", type: "HEAD" }).fail(function() {
self._checkExtensionsLoaded();
}).done(function() {
require([entryPoint], self.registerExtension.bind(self), function(err) {
require(
["extensions/" + name + "/static/js/extension"],
this.registerExtension.bind(this),
function(err) {
if (vispa.args.global.devMode) {
self.logger.error("extension '%s' failed to load due to: %s",
err.requireModules[0].split("/")[1], err.requireType);
}
self._checkExtensionsLoaded();
});
});
}
);
},
start: function start() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment