Skip to content

Commit 1fdc2ad

Browse files
committed
fixup: set sync rv for arrow functions
1 parent 2ed78b5 commit 1fdc2ad

File tree

1 file changed

+2
-2
lines changed
  • packages/async-rewriter3/src

1 file changed

+2
-2
lines changed

packages/async-rewriter3/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fn fn_start_insertion(body: &ExprOrBlock) -> InsertionList {
134134
if !is_block(body) {
135135
ret.push_back(Insertion::new(
136136
offset,
137-
"return ("
137+
"return (_synchronousReturnValue = ("
138138
));
139139
}
140140
ret
@@ -145,7 +145,7 @@ fn fn_end_insertion(body: &ExprOrBlock) -> InsertionList {
145145
if is_block(body) {
146146
offset = offset.checked_sub(1.into()).unwrap();
147147
} else {
148-
ret.push_back(Insertion::new(offset, ");"));
148+
ret.push_back(Insertion::new(offset, "));"));
149149
}
150150
ret.push_back(make_end_fn_insertion(offset));
151151
if !is_block(body) {

0 commit comments

Comments
 (0)