Fix basePath in IE.

Former-commit-id: 3c78a042183ffbb52c22a6979f71f842d6a1ea38
This commit is contained in:
John-David Dalton
2013-08-27 21:54:03 -07:00
parent a1507d4844
commit db605ea7ca
2 changed files with 2 additions and 2 deletions

View File

@@ -54,7 +54,7 @@
return;
}
var reBasename = /[\w.-]+$/,
basePath = (location.origin + location.pathname).split(/\btest\b/).slice(0, -1).join('test'),
basePath = ('//' + location.hostname + location.pathname).replace(/\btest\/$/, ''),
isModularize = /modularize/.test(ui.urlParams.build),
modulePath = ui.buildPath.replace(/\.js$/, ''),
moduleMain = modulePath.match(reBasename)[0];

View File

@@ -89,7 +89,7 @@
return;
}
var reBasename = /[\w.-]+$/,
basePath = (location.origin + location.pathname).split(/\btest\b/).slice(0, -1).join('test'),
basePath = ('//' + location.hostname + location.pathname).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
moduleMain = modulePath.match(reBasename)[0];