mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
Don't return await from async func
This commit is contained in:
parent
95208d173b
commit
2b4c2dca97
3 changed files with 2 additions and 3 deletions
|
|
@ -6,7 +6,6 @@
|
|||
"no-nested-ternary": "off",
|
||||
"react-hooks/rules-of-hooks": "off",
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
"no-return-await": "off",
|
||||
"eqeqeq": "off",
|
||||
"no-else-return": "off",
|
||||
"import/no-extraneous-dependencies": "off"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import Text from "./runtime/Text";
|
|||
import Status from "./runtime/Status";
|
||||
|
||||
async function loadImage(imgUrl) {
|
||||
return await new Promise((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
img.addEventListener("load", () => {
|
||||
resolve(img);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export async function asyncFlatMap(arr, mapper) {
|
|||
const mapped = await Promise.all(arr.map(mapper));
|
||||
const childPromises = mapped.map(async item => {
|
||||
if (Array.isArray(item)) {
|
||||
return await asyncFlatMap(item, mapper);
|
||||
return asyncFlatMap(item, mapper);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue