From: Nook Scheel Date: Fri, 20 May 2016 13:04:12 +0000 (+0300) Subject: Fix input-source-map-tracker for node@6.* X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bf56fe2117e0fc4f25e92ec21a2cf7de599e2655;p=clean-css.git Fix input-source-map-tracker for node@6.* --- diff --git a/lib/utils/input-source-map-tracker.js b/lib/utils/input-source-map-tracker.js index 7db9eb9e..bfd9106f 100644 --- a/lib/utils/input-source-map-tracker.js +++ b/lib/utils/input-source-map-tracker.js @@ -188,7 +188,7 @@ function trackContentSources(self, sourceFile) { consumer.sources.forEach(function (file, index) { var uniquePath = isRemote ? url.resolve(path.dirname(sourceFile), file) : - path.relative(self.relativeTo, path.resolve(path.dirname(sourceFile), file)); + path.relative(self.relativeTo, path.resolve(path.dirname(sourceFile || '.'), file)); sourcesMapping[uniquePath] = consumer.sourcesContent && consumer.sourcesContent[index]; });