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.
bayhaqi:15476Abū Bakr Aḥmad b. al-Ḥasan al-Qāḍī > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > al-Rabīʿ b. Sulaymān > al-Shāfiʿī > Mālik > Nāfiʿ > Ibn ʿUmar Suʾil > al-Marʾah Yutawaffá ʿAnhā Zawjuhā And Hī Ḥāmil > Ibn ʿUmar Idhā Waḍaʿat Ḥamlahā Faqad Ḥallat Faʾakhbarah a man from al-Anṣār > ʿUmar b. al-Khaṭṭāb

[Machine] If she gave birth and her husband is on the bed, the baby would not be buried. Allah knows best.  

البيهقي:١٥٤٧٦أَخْبَرَنَا أَبُو بَكْرٍ أَحْمَدُ بْنُ الْحَسَنِ الْقَاضِي نا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ أنا الرَّبِيعُ بْنُ سُلَيْمَانَ أنا الشَّافِعِيُّ أنا مَالِكٌ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ ؓ سُئِلَ عَنِ الْمَرْأَةِ يُتَوَفَّى عَنْهَا زَوْجُهَا وَهِيَ حَامِلٌ فَقَالَ ابْنُ عُمَرَ ؓ إِذَا وَضَعَتْ حَمْلَهَا فَقَدْ حَلَّتْ فَأَخْبَرَهُ رَجُلٌ مِنَ الْأَنْصَارِ أَنَّ عُمَرَ بْنَ الْخَطَّابِ ؓ قَالَ

لَوْ وَلَدَتْ وَزَوْجُهَا عَلَى السَّرِيرِ لَمْ يُدْفَنْ لَحَلَّتْ وَاللهُ أَعْلَمُ