[Pkg-javascript-commits] [less.js] 194/285: sourcemap filename is optional so put a guard around the path replace

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:23:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.0.0
in repository less.js.

commit 9f82ece8fb13b51c5b2b4c7253b54e8efe1f5b42
Author: Luke Page <luke.a.page at gmail.com>
Date:   Sun Oct 19 18:40:12 2014 +0100

    sourcemap filename is optional so put a guard around the path replace
---
 lib/less/source-map-output.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/less/source-map-output.js b/lib/less/source-map-output.js
index 8f5b45a..0d501e5 100644
--- a/lib/less/source-map-output.js
+++ b/lib/less/source-map-output.js
@@ -5,7 +5,9 @@ module.exports = function (environment) {
         this._rootNode = options.rootNode;
         this._contentsMap = options.contentsMap;
         this._contentsIgnoredCharsMap = options.contentsIgnoredCharsMap;
-        this._sourceMapFilename = options.sourceMapFilename.replace(/\\/g, '/');
+        if (options.sourceMapFilename) {
+            this._sourceMapFilename = options.sourceMapFilename.replace(/\\/g, '/');
+        }
         this._outputFilename = options.outputFilename;
         this.sourceMapURL = options.sourceMapURL;
         if (options.sourceMapBasepath) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list