Sunan Ibn Majah, Book 23, Hadith 32 (Ibn Majah 2752)

It was narrated from Jabir that the Messenger of Allah (ﷺ) said:

“If the child has cired, the (funeral) prayer should be offered for him (if he dies) and he is an heir.”