mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 21:54:36 +03:00
fix(common): Fix handling of input source maps (#4086)
This commit is contained in:
parent
79d0d06fd6
commit
b716210de1
@ -1145,11 +1145,10 @@ impl SourceMap {
|
||||
|
||||
if let Some(orig) = orig {
|
||||
for src in orig.sources() {
|
||||
let idx = builder.add_source(src);
|
||||
src_id = idx as u32 + 1;
|
||||
}
|
||||
for (idx, contents) in orig.source_contents().enumerate() {
|
||||
builder.set_source_contents(idx as _, contents);
|
||||
let id = builder.add_source(src);
|
||||
src_id = id as u32 + 1;
|
||||
|
||||
builder.set_source_contents(id, orig.get_source_contents(id));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user