Is eating chocolate bad while breastfeeding

After my delivery when asked about diet during nursing ,nurse in hospital told to just avoid chocolate and eat everything else

But I love my Kirkland nut bars that has chocolate and they help me so much with snacking that keeps supply up. But what she said is always on my mind

Is chocolate bad, if so why?