Recollect, some years ago, a colleague had smoke in the cabin.
He declared Mayday and commenced an immediate diversion to the nearest airport.
On the descent, the smoke cleared but he continued with the diversion and got it on the ground.
I was astonished to hear comment from a couple of colleagues that, when the smoke cleared, they thought he should have continued to destination.
In my opinion, he was absolutely correct to continue the emergency diversion.