Pregnant and smoking, need advice.

I’m about 30 weeks pregnant right now and I’ve been smoking weed to help with mainly the Nausea, I’m in Canada (Ontario) and I’m scared about it being an issue when the baby’s born if it’s in my system so when did the moms who smoked when pregnant stop? I was thinking maybe around 37 weeks but I’m not sure? Or will it not be an issue if I don’t stop? Hopefully someone from Ontario can answer too. What do y’all think?