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.
أَسْلَمَتِ امْرَأَةٌ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ فَتَزَوَّجَتْ فَجَاءَ زَوْجُهَا إِلَى النَّبِيِّ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ إِنِّي قَدْ كُنْتُ أَسْلَمْتُ وَعَلِمَتْ بِإِسْلاَمِي فَانْتَزَعَهَا رَسُولُ اللَّهِ ﷺ مِنْ زَوْجِهَا الآخَرِ وَرَدَّهَا إِلَى زَوْجِهَا الأَوَّلِ