diff --git a/src/resolve.js b/src/resolve.js index 702eab41..5194f095 100644 --- a/src/resolve.js +++ b/src/resolve.js @@ -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); diff --git a/test/test.js b/test/test.js index 23cfa25e..6b3bc2ff 100644 --- a/test/test.js +++ b/test/test.js @@ -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');