Breastfeeding and laxatives! Help!!

Help!! I’ve been really constipated and my doctor told me to take Milk of magnesia. I nursed my 5 month old as much as she wanted today, hoping to put her to bed and take the medicine. She usually wakes up 1-2 times a night and I nurse her but my Hope was that I’d really fill her up during the day so she wouldn’t be hungry at night. Anyways so I took the medicine and right after realized I should have just pumped a bottle before hand 🤦🏻‍♀️ Soooo mad at myself!! My doctor said that it’s safe during breastfeeding but I’m

Still nervous to nurse her!( I feel like when I just drink prune juice she poops a lot and I don’t want to hurt her) Can I pump and dump? If so when should I do it? I put her to bed at 8:30 she usually will wake up between 12:30-1:30 And I took the laxative at 9.