state.js: do not shadow outer state var (#1375)

This commit is contained in:
Masen Furer 2023-07-19 18:09:55 -07:00 committed by GitHub
parent 4505279d5d
commit 915685c073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,7 +222,7 @@ export const processEvent = async (
const event = state.events.shift();
// Set new events to avoid reprocessing the same event.
setState(state => ({ ...state, events: state.events }));
setState(currentState => ({ ...currentState, events: state.events }));
// Process events with handlers via REST and all others via websockets.
let eventSent = false;