Upset newborn tummy

Should I continue to breastfeed if what I ate caused my baby a stomach ache, or should I pump the milk out and get rid of it and then try again a day later to see if what I ate is out of my breast milk ?