It is unlikely that famotidine can cause damage to the baby, because, at this age, the drug is used therapeutically in doses much higher than those that could be transferred through breast milk.
It is estimated that an exclusively breastfed infant would receive a dose of 2% of the amount given to the mother.
Medicines of this therapeutic group can raise prolactin levels, although this effect in a nursing mother is, quite possibly, marginal.
Warning of the manufacturer:
Famotidine has been detected in breast milk. Nursing mothers should discontinue therapy or nursing.