It depends. If there are just a couple of small spots and the orange still smells fresh, it's probably safe enough to eat. Anything more than that should be discarded.