Was it right to default Medvedev for hitting spectator with ball?

- Medvedev: 11 events in the last 90 days
- Previous: earlier the same day · Calm in real life but demons on court - Medvedev runs out of chances
What happened
Daniil Medvedev was defaulted for hitting a spectator with the ball during his semi-final with Novak Djokovic at the China Open, but was it the correct decision or should he have been able to continue playing?
Summary assembled by rule from the sources below