Apply suggestions from code review
make queueEvent call async Co-authored-by: Masen Furer <m_github@0x26.net>
This commit is contained in:
parent
70b67ed339
commit
e74c39cb68
@ -135,11 +135,11 @@ export const applyDelta = (state, delta) => {
|
|||||||
*
|
*
|
||||||
* @returns Adds event to queue and processes it if websocket exits, does nothing otherwise.
|
* @returns Adds event to queue and processes it if websocket exits, does nothing otherwise.
|
||||||
*/
|
*/
|
||||||
export const queueEventIfSocketExists = (events, socket) => {
|
export const queueEventIfSocketExists = async (events, socket) => {
|
||||||
if (!socket) {
|
if (!socket) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
queueEvents(events, socket);
|
await queueEvents(events, socket);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user