We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 238a4ed + 1b8bfa5 commit a8e922bCopy full SHA for a8e922b
CCBoot.js
@@ -838,7 +838,7 @@ cc.loader = /** @lends cc.loader# */{
838
return cb();
839
}
840
var realUrl = url;
841
- if (!url.match(cc._urlRegExp))
+ if (!cc._urlRegExp.test(url))
842
{
843
var basePath = loader.getBasePath ? loader.getBasePath() : self.resPath;
844
realUrl = self.getUrl(basePath, url);
@@ -2367,6 +2367,8 @@ cc._urlRegExp = new RegExp(
2367
"(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*" +
2368
// TLD identifier
2369
"(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))" +
2370
+ "|" +
2371
+ "(?:localhost)" +
2372
")" +
2373
// port number
2374
"(?::\\d{2,5})?" +
0 commit comments