Should I of not done that???? Terrified

So my cat dumped over some cat food and the little room it's in was COVERED in little ants. I mean the whole floor was moving. I didn't want them to spread so I quickly grabbed some raid and started spraying. I covered my face and held my breath as best as I could then ran outside. I have the door to that room closed and windows open but I'm terrified I hurt my baby with the raid spray. I'm 7 weeks. I know I shouldn't have but I had no choice but to spray it 😰😰😰