From c28ba9a2ee3235b81017798c8c4748e9335488b3 Mon Sep 17 00:00:00 2001 From: Jakub Pawlowicz Date: Sat, 29 Nov 2014 23:54:20 +0000 Subject: [PATCH] Simplifies resolving paths in source map stringifier. --- lib/selectors/source-map-stringifier.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/selectors/source-map-stringifier.js b/lib/selectors/source-map-stringifier.js index e8b9ba7b..8ca43baf 100644 --- a/lib/selectors/source-map-stringifier.js +++ b/lib/selectors/source-map-stringifier.js @@ -10,7 +10,6 @@ function Rebuilder(options, restoreCallback, inputMapTracker) { this.line = 1; this.output = []; this.keepBreaks = options.keepBreaks; - this.relativeTo = options.relativeTo; this.restore = restoreCallback; this.inputMapTracker = inputMapTracker; this.outputMap = new SourceMapGenerator(); @@ -32,9 +31,7 @@ Rebuilder.prototype.relativePathResolver = function (sourcePath, sourceRelativeT if (sourceRelativeTo) sourcePath = path.resolve(path.dirname(sourceRelativeTo), sourcePath); - return path.normalize(sourcePath) === path.resolve(sourcePath) ? - path.relative(this.rebaseTo, sourcePath) : - path.relative(this.rebaseTo, path.join(this.relativeTo, sourcePath)); + return path.relative(this.rebaseTo, sourcePath); }; Rebuilder.prototype.rebuildValue = function (list, separator) { -- 2.34.1