Skip to content

Commit

Permalink
fix: add explicit await for format function
Browse files Browse the repository at this point in the history
  • Loading branch information
joemckenney committed Jan 10, 2024
1 parent 788c9bf commit abf62f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/
2 changes: 1 addition & 1 deletion src/PrettierEditService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ export default class PrettierEditService implements Disposable {
this.loggingService.logInfo('Prettier Options:', prettierOptions)

try {
const formattedText = prettierInstance.format(text, prettierOptions)
const formattedText = await prettierInstance.format(text, prettierOptions)
this.statusBar.update(FormatterStatus.Success)

return formattedText
Expand Down

0 comments on commit abf62f8

Please sign in to comment.