mirror of
https://github.com/systemjs/systemjs.git
synced 2026-01-18 14:53:14 +00:00
resolveSync fixup
This commit is contained in:
parent
d1bdd5d150
commit
ca6dfee95d
@ -224,10 +224,7 @@ function packageResolveSync (config, key, parentKey, metadata, parentMetadata, s
|
||||
}
|
||||
}
|
||||
|
||||
var trailingSlash = key[key.length - 1] === '/';
|
||||
var normalized = coreResolve.call(this, config, trailingSlash ? key : key + '/', parentKey, true, true);
|
||||
if (!trailingSlash)
|
||||
normalized = normalized.substr(0, normalized.length - 1);
|
||||
var normalized = coreResolve.call(this, config, key, parentKey, true, true);
|
||||
|
||||
var pkgConfigMatch = getPackageConfigMatch(config, normalized);
|
||||
metadata.packageKey = pkgConfigMatch && pkgConfigMatch.packageKey || getMapMatch(config.packages, normalized);
|
||||
|
||||
@ -234,8 +234,6 @@ suite('SystemJS Standard Tests', function() {
|
||||
}
|
||||
});
|
||||
|
||||
var base = System.resolveSync('./');
|
||||
|
||||
return Promise.all([
|
||||
System.resolve('a'),
|
||||
System.resolve('f/b'),
|
||||
@ -246,6 +244,9 @@ suite('SystemJS Standard Tests', function() {
|
||||
System.resolve('b.js/c'),
|
||||
System.resolve('g/x')
|
||||
]).then(function (a) {
|
||||
var base = System.resolveSync('');
|
||||
console.log(base);
|
||||
ok(base.length > 10);
|
||||
ok(a[0] === base + 'b');
|
||||
ok(a[1] === base + 'c/b');
|
||||
ok(a[2] === base + 'b/b');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user