Metal filling tooth pregnant

Im 19 weeks pregnant and got a filling done today. The dentist said it was safe. But I’m still worried because I looked up online that metal fillings have mercury in them and can cross the placenta. Now I’m worried and freaking out....