Typescript, Compose: use forEach

entities
Alex Gleason 2022-02-28 14:13:40 -06:00
rodzic 3a5c62cb70
commit d72ef7b423
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -310,8 +310,8 @@ export function uploadCompose(files) {
dispatch(uploadComposeRequest());
for (const [i, f] of Array.from(files).entries()) {
if (media.size + i > attachmentLimit - 1) break;
Array.from(files).forEach((f, i) => {
if (media.size + i > attachmentLimit - 1) return;
// FIXME: Don't define function in loop
/* eslint-disable no-loop-func */
@ -348,7 +348,7 @@ export function uploadCompose(files) {
});
}).catch(error => dispatch(uploadComposeFail(error)));
/* eslint-enable no-loop-func */
}
});
};
}