It is narrated from Sayyiduna Jabir (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: "The slaughtering of the fetus in the womb is the same as the slaughtering of its mother." Imam Darimi (may Allah have mercy on him) was asked: Can it also be eaten? He replied: "Yes."
Brief Explanation
(Commentary on Hadith 2017)
The meaning of this hadith is that if a goat is slaughtered and a fetus is found in its womb, then there is no need to slaughter the fetus; it can be eaten as it is, without slaughtering.
Most scholars hold this opinion.
Imam Abu Hanifah rahimahullah says: If it comes out alive, then it should be slaughtered before eating, and if it comes out dead, then it should not be eaten.