fix regression in loading workers in packed mode

This commit is contained in:
nightwing 2014-08-14 12:49:00 +04:00
commit 084dd4c132

View file

@ -81,6 +81,10 @@ exports.moduleUrl = function(name, component) {
// todo make this configurable or get rid of '-'
var sep = component == "snippets" ? "/" : "-";
var base = parts[parts.length - 1];
if (component == "worker" && sep == "-") {
var re = new RegExp("^" + component + "[\\-_]|[\\-_]" + component + "$", "g");
base = base.replace(re, "");
}
if ((!base || base == component) && parts.length > 1)
base = parts[parts.length - 2];