Skip to content

Commit 1e617f4

Browse files
committed
Fix broken async callback in join lines
1 parent 01d412f commit 1e617f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

editors/code/src/commands.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ export function joinLines(ctx: Ctx): Cmd {
125125
editor.document
126126
),
127127
});
128-
await editor.edit(async (builder) => {
129-
(await client.protocol2CodeConverter.asTextEdits(items)).forEach((edit: any) => {
128+
const textEdits = await client.protocol2CodeConverter.asTextEdits(items);
129+
await editor.edit((builder) => {
130+
textEdits.forEach((edit: any) => {
130131
builder.replace(edit.range, edit.newText);
131132
});
132133
});

0 commit comments

Comments
 (0)