That's a good question for your doctor. It might depend on what you were taking and the dosage. I was still on my antidepressant when I got pregnant with both my kids, and they're totally fine. Of course I haven't taken any meds while pregnant (except for 1 week last month, but it was a very low dose).
So yeah, ask your doctor to get the best answer.