Don't dispatch flight position updates when empty.

This commit is contained in:
Dan Albert 2022-03-06 22:03:38 -08:00
parent 6f21067ddb
commit 0afe1f69d4

View File

@ -54,9 +54,11 @@ export const handleStreamedEvents = (
dispatch: AppDispatch,
events: GameUpdateEvents
) => {
if (Object.keys(events.updated_flight_positions).length) {
dispatch(
updateFlightPositions(Object.entries(events.updated_flight_positions))
);
}
for (const combat of events.new_combats) {
dispatch(newCombat(combat));