make sure events are not queued for server side events particularly ones that call queueEvents(clear_local_storage, clear_cookies, remove_local_storage, remove_cookies) when the app is stateless(no ws)
This commit is contained in:
parent
6437067de8
commit
13b041ce5d
@ -281,6 +281,12 @@ export const applyRestEvent = async (event, socket) => {
|
|||||||
* @param socket The socket object to send the event on.
|
* @param socket The socket object to send the event on.
|
||||||
*/
|
*/
|
||||||
export const queueEvents = async (events, socket) => {
|
export const queueEvents = async (events, socket) => {
|
||||||
|
|
||||||
|
// Only proceed if the socket is up, otherwise we throw the event into the void
|
||||||
|
if (!socket) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
event_queue.push(...events);
|
event_queue.push(...events);
|
||||||
await processEvent(socket.current);
|
await processEvent(socket.current);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user