Condenser Fan Running Off & On

Refrigerator condensing fan is going off and on a lot even while the compressor is running steady. I can hear a click coming from the inverter box each time fan shuts off and then again when it goes back on. Not sure if I should replace the fan motor or the inverter box. I’m thinking the inverter box but just wanted conformation. Hopefully it is not the control panel as they are no longer available for this model. Thanks for any help.