Ryobi impact driver quit working , wires connected to a diode shorted and exploded

Tore it down and found a couple of wires burnt and a diode exploded ,