mirror of
https://github.com/status-im/wakuconnect-chat-sdk.git
synced 2025-01-13 21:54:49 +00:00
use reverse()
This commit is contained in:
parent
b9062d556b
commit
4c1413cadf
@ -100,7 +100,7 @@ export async function fetchMessages(
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (remainingFetchedMessages.length) {
|
if (remainingFetchedMessages.length) {
|
||||||
const _chunk = remainingFetchedMessages.splice(0)
|
const _chunk = remainingFetchedMessages.splice(0).reverse()
|
||||||
const _messages = [..._chunk, ...fetchedMessages, ...storedMessages]
|
const _messages = [..._chunk, ...fetchedMessages, ...storedMessages]
|
||||||
|
|
||||||
callback(_messages)
|
callback(_messages)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user