Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:28:10

And the heart of Moses' mother became empty ˹of all else˺. She was about to disclose ˹the matter concerning˺ him had We not bound fast her heart that she would be of the believers.  

And the heart of Moses’s mother, when she found out that they had picked him up, became empty, of everything other than him. Indeed (in, softened from the hardened form, its subject omitted, in other words ˹understand it as˺ innaha) she was about to expose him, that is, as being her son, had We not fortified her heart, with patience, that is, We made it at peace, that she might be of the believers, ˹of˺ those who have faith in God’s promise (the response to ˹the conditional˺ lawlā, ‘had … not’, is given by the preceding ˹statement˺).
القرآن:٢٨:١٠

وَأَصْبَحَ فُؤَادُ أُمِّ مُوسَىٰ فَارِغًا ۖ إِنْ كَادَتْ لَتُبْدِي بِهِ لَوْلَا أَنْ رَبَطْنَا عَلَىٰ قَلْبِهَا لِتَكُونَ مِنَ الْمُؤْمِنِينَ  

{وأصبح فؤاد أم موسى} لما علمت بالتقاطه {فارغاً} مما سواه. {إن} مخففة من الثقيلة واسمها محذوف أي إنها {كادت لتبدي به} أي بأنه ابنها {لولا أن ربطنا على قلبها} بالصبر أي سكناه {لتكون من المؤمنين} المصدقين بوعد الله وجواب لولا دل عليه ما قبله.