Set initialDataReceived on first websocket payload

This commit is contained in:
rcourtman 2025-11-16 00:03:04 +00:00
parent 26442beca1
commit aa7b7b0922

View file

@ -326,8 +326,8 @@ export function createWebSocketStore(url: string) {
) { ) {
// Update state properties individually to ensure reactivity // Update state properties individually to ensure reactivity
if (message.data) { if (message.data) {
// Mark that we've received initial data // Mark that we've received usable data (initial payload or raw update)
if (message.type === WEBSOCKET.MESSAGE_TYPES.INITIAL_STATE) { if (!initialDataReceived()) {
setInitialDataReceived(true); setInitialDataReceived(true);
} }