Remove await -> function returns a promise anyway
@@ -324,8 +324,8 @@ export function reconnect() {
*/
const connectionUris = getOwnedConnectionUris(state);
await Promise.all(
- connectionUris.map(async connectionUri => {
- await loadLatestMessagesOfConnection({
+ connectionUris.map(connectionUri =>
+ loadLatestMessagesOfConnection({
connectionUri,
numberOfEvents: 10, //TODO magic number :|
state,
@@ -335,8 +335,8 @@ export function reconnect() {
success: actionTypes.reconnect.receivedConnectionData,
failure: actionTypes.reconnect.connectionFailedToLoad,
},
- });
})
+ )
);
} catch (e) {
if (e.message == "Unauthorized") {
