mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Don't dispatch flight position updates when empty.
This commit is contained in:
parent
6f21067ddb
commit
0afe1f69d4
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user