fix #1500 too enthusiastic String replace in config.moduleUrl
This commit is contained in:
parent
6a87d9782b
commit
3139b3964d
1 changed files with 2 additions and 1 deletions
|
|
@ -77,7 +77,8 @@ exports.moduleUrl = function(name, component) {
|
|||
|
||||
var parts = name.split("/");
|
||||
component = component || parts[parts.length - 2] || "";
|
||||
var base = parts[parts.length - 1].replace(component, "").replace(/(^[\-_])|([\-_]$)/, "");
|
||||
var re = new RegExp("^" + component + "[\-_]|[\-_]" + component + "$", "g");
|
||||
base = base.replace(re, "");
|
||||
|
||||
if (!base && parts.length > 1)
|
||||
base = parts[parts.length - 2];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue