Explorar o código

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

Masen Furer hai 1 ano
pai
achega
915685c073
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      reflex/.templates/web/utils/state.js

+ 1 - 1
reflex/.templates/web/utils/state.js

@@ -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;