Sleeping Medication while pregnant ! Help!

I want to know if anyone has been on sleeping meds while pregnant and if it hurt your baby? I’ve been on sleeping meds for awhile before pregnancy (zolpidum) and there just now telling me it crosses to the baby a tiny bit and they have to check to see if I cant continue taking it or if I ((have)) to continue taking it. Anyone else on this medication while pregnant and know anything?