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.
This commit is contained in:
Bryce Cronkite-Ratcliff
2015-01-24 00:24:08 -08:00
parent d36067cd35
commit 5c02d65ddb

View File

@@ -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()); }
};
};