I think the mother gets precedent over the child. Even if the pregnancy is viable and there is no elevated risk of harm to the mother, she should still be allowed to have an abortion.
Some people disagree with me though for the reasons I have mentioned.