A woman embraced Islam during the time of the Messenger of Allah ﷺ; she then married. Her (former) husband then came to the Prophet ﷺ and said: Messenger of Allah, I have already embraced Islam, and she had the knowledge about my Islam. The Messenger of Allah ﷺ took her away from her latter husband and restored her to her former husband. (Using translation from Abū Dāʾūd 2239)
أَسْلَمَتِ امْرَأَةٌ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ فَتَزَوَّجَتْ فَجَاءَ زَوْجُهَا إِلَى رَسُولِ اللَّهِ ﷺ فَقَالَ إِنِّي قَدْ أَسْلَمْتُ مَعَهَا وَعَلِمَتْ بِإِسْلَامِي مَعَهَا «فَنَزَعَهَا رَسُولُ اللَّهِ ﷺ مِنْ زَوْجِهَا الْآخَرَ وَرَدَّهَا إِلَى زَوْجِهَا الْأَوَّلِ»