Skip to content

Commit

Permalink
prevent changing total line number when transforming
Browse files Browse the repository at this point in the history
  • Loading branch information
ZZZank committed Aug 10, 2024
1 parent 3de65ac commit 2d1b7ee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public void wrapScope() {
.map(s -> String.format("%s: %s", s, s))
.collect(Collectors.joining(", "));
String destructed = String.join(", ", exportedSymbols);
lines.add(0, String.format("const {%s} = (()=>{", destructed));
lines.add(String.format("return {%s};})()", exported));
lines.set(0, String.format("const {%s} = (()=>{ %s", destructed, lines.get(0)));
lines.set(lines.size() - 1, String.format("%s; return {%s};})()", lines.get(lines.size() - 1), exported));
}

public String[] transform() {
Expand Down

0 comments on commit 2d1b7ee

Please sign in to comment.