iv fluids in ER

Julie
Was diagnosed with an awful stomach bug today. Was sent to ER for fluids for dehydration. They're also giving me magnesium and potassium through IV. Is this safe for baby? I'm sure hospital wouldn't do it if it wasn't but I couldn't find much when I googled. Did anyone else go through something similar?