Skip to content

Commit 1d786c3

Browse files
committed
replace config normalize with coreResolve
1 parent faa6e63 commit 1d786c3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/core.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ SystemJSLoader.prototype.config = function(cfg) {
300300
// object map backwards-compat into packages configuration
301301
if (typeof v !== 'string') {
302302
objMaps += (objMaps.length ? ', ' : '') + '"' + p + '"';
303-
var normalized = this.normalizeSync(p);
303+
var normalized = coreResolve.call(this, p);
304304

305305
// if doing default js extensions, undo to get package name
306306
if (this.defaultJSExtensions && p.substr(p.length - 3, 3) != '.js')
@@ -333,7 +333,7 @@ SystemJSLoader.prototype.config = function(cfg) {
333333
for (var i = 0; i < cfg.packageConfigPaths.length; i++) {
334334
var path = cfg.packageConfigPaths[i];
335335
var packageLength = Math.max(path.lastIndexOf('*') + 1, path.lastIndexOf('/'));
336-
var normalized = this.normalizeSync(path.substr(0, packageLength) + '/');
336+
var normalized = coreResolve.call(this, path.substr(0, packageLength) + '/');
337337
if (this.defaultJSExtensions && path.substr(path.length - 3, 3) != '.js')
338338
normalized = normalized.substr(0, normalized.length - 3);
339339
packageConfigPaths[i] = normalized.substr(0, normalized.length - 1) + path.substr(packageLength);
@@ -347,7 +347,7 @@ SystemJSLoader.prototype.config = function(cfg) {
347347
throw new TypeError('"' + p + '" is not a valid package name.');
348348

349349
// request with trailing "/" to get package name exactly
350-
var prop = this.normalizeSync(p + (p[p.length - 1] != '/' ? '/' : ''));
350+
var prop = coreResolve.call(this, p + (p[p.length - 1] != '/' ? '/' : ''));
351351
prop = prop.substr(0, prop.length - 1);
352352

353353
// if doing default js extensions, undo to get package name
@@ -376,7 +376,7 @@ SystemJSLoader.prototype.config = function(cfg) {
376376
for (var p in cfg.bundles) {
377377
var bundle = [];
378378
for (var i = 0; i < cfg.bundles[p].length; i++)
379-
bundle.push(this.normalizeSync(cfg.bundles[p][i]));
379+
bundle.push(coreResolve.call(this, cfg.bundles[p][i]));
380380
this.bundles[p] = bundle;
381381
}
382382
}
@@ -401,7 +401,7 @@ SystemJSLoader.prototype.config = function(cfg) {
401401
if (c == 'meta' && p[0] == '*')
402402
this[c][p] = v[p];
403403
else if (normalizeProp)
404-
this[c][this.normalizeSync(p)] = v[p];
404+
this[c][coreResolve.call(this, p)] = v[p];
405405
else
406406
this[c][p] = v[p];
407407
}

0 commit comments

Comments
 (0)