-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In example code, simply return the promise from Response.blob. (#23)
It's unnecessary to await a promise returned from an async function (except if, as not needed here, the exception is to be caught in this function instead of by a caller). It's slightly verbose and advised against: https://github.com/eslint/eslint/blob/master/docs/rules/no-return-await.md https://jakearchibald.com/2017/await-vs-return-vs-return-await/ Since this is the only use of await, this function is not actually async. Finally, it should be named with the same casing convention as the previous example.
- Loading branch information
1 parent
1f86708
commit 62d660d
Showing
2 changed files
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters