Breastfeeding while you are sick, is actually preferred against not breastfeeding while sick.
Whether you breastfeed or not, your baby will be exposed to your germs, but when you breastfeed, antibodies are transferred to your baby that can help fight off the cold or flu.