Skip to content

Commit

Permalink
Fix sourcemaps failing on refresh (#1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeMoorJasper authored and devongovett committed Jul 22, 2018
1 parent f3a43a8 commit 569b60a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/SourceMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ class SourceMap {
}

addMapping(mapping, lineOffset = 0, columnOffset = 0) {
mapping.generated = {
line: mapping.generated.line + lineOffset,
column: mapping.generated.column + columnOffset
};

this.mappings.push(mapping);
this.mappings.push({
source: mapping.source,
original: mapping.original,
generated: {
line: mapping.generated.line + lineOffset,
column: mapping.generated.column + columnOffset
}
});
}

addConsumerMapping(mapping, lineOffset = 0, columnOffset = 0) {
Expand Down

0 comments on commit 569b60a

Please sign in to comment.