From 5c02d65ddb8d315d53a4356c038b461ddb1cb029 Mon Sep 17 00:00:00 2001 From: Bryce Cronkite-Ratcliff Date: Sat, 24 Jan 2015 00:24:08 -0800 Subject: [PATCH] fixes issue #621 SourceMap toString JSON format The correct format of a sourcemap is acquired from a mozilla source map generator by calling toJSON on this object. This patch alters the toString function on mozilla generators to print the format that is to spec instead of the generator's internal representation of itself. --- lib/sourcemap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sourcemap.js b/lib/sourcemap.js index 3998e405..a67011f0 100644 --- a/lib/sourcemap.js +++ b/lib/sourcemap.js @@ -87,6 +87,6 @@ function SourceMap(options) { return { add : add, get : function() { return generator }, - toString : function() { return generator.toString() } + toString : function() { return JSON.stringify(generator.toJSON()); } }; }; -- 2.34.1