mirror of
https://github.com/waku-org/js-waku-examples.git
synced 2025-02-22 12:48:15 +00:00
fix: failed parsing problem (#287)
This commit is contained in:
parent
73ca3ab4e9
commit
b753794bdc
@ -65,16 +65,14 @@ function App() {
|
||||
}
|
||||
)) {
|
||||
const messages = await Promise.all(
|
||||
messagesPromises
|
||||
.map(async (p) => {
|
||||
const msg = await p;
|
||||
return decodeMessage(msg);
|
||||
})
|
||||
.filter(Boolean)
|
||||
messagesPromises.map(async (p) => {
|
||||
const msg = await p;
|
||||
return decodeMessage(msg);
|
||||
})
|
||||
);
|
||||
|
||||
setMessages((currentMessages) => {
|
||||
return currentMessages.concat(messages.reverse());
|
||||
return currentMessages.concat(messages.filter(Boolean).reverse());
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user