Shaving close to end of pregnancy?

I’m 38 weeks and I had just shaved down there, but then right after I read that I shouldn’t due to risk of infection and now I’m freaking out. Will baby be okay? Has anyone shaved so close to the end of pregnancy and turned out fine?