Is this even legal

Kelly

My job wants to “terminate” me in order for me to go on maternity leave because I don’t qualify for FMLA and they have no maternity leave policy. From my understanding it’s illegal to fire someone due to pregnancy, childbirth, or and side effect of pregnancy.