Talaaq of a non muslim

If a non Muslim couple files for divorce in the court and in the meantime while they are waiting for the court date the wife accepts Islam. In such a case; Islamically when does the nikkah breaks? Does it break when the woman accepted Islam or does it break when the...