It wasnarrated from Jabir that the Messenger of Allah (ﷺ) said:
"If thechild has cired, the (funeral) prayer should be offered forhim (ifhe dies) and he is an heir." (JA)
English reference (JA): Vol. 4, Book 23, Hadith 2750 (JA)
Arabic reference (JA): Book 23, Hadith 2855 (JA)