aboutsummaryrefslogtreecommitdiff
path: root/lib/sourcemap.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sourcemap.js')
-rw-r--r--lib/sourcemap.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/sourcemap.js b/lib/sourcemap.js
index 232cfabd..25fbe3bf 100644
--- a/lib/sourcemap.js
+++ b/lib/sourcemap.js
@@ -103,12 +103,16 @@ function SourceMap(options) {
if (options.orig) Object.keys(options.orig).forEach(function(name) {
var map = options.orig[name];
var indices = [ 0, 0, 1, 0, 0 ];
- map.mappings = map.mappings.split(/;/).map(function(line) {
- indices[0] = 0;
- return line.split(/,/).map(function(segment) {
- return indices.slice(0, vlq_decode(indices, segment));
- });
- });
+ options.orig[name] = {
+ names: map.names,
+ mappings: map.mappings.split(/;/).map(function(line) {
+ indices[0] = 0;
+ return line.split(/,/).map(function(segment) {
+ return indices.slice(0, vlq_decode(indices, segment));
+ });
+ }),
+ sources: map.sources,
+ };
if (!sources_content || !map.sourcesContent) return;
for (var i = 0; i < map.sources.length; i++) {
var content = map.sourcesContent[i];