I guess it depends on how sever the condition it is. Some is too sever that it is too dangerous to keep the baby inside then will have no choice to let the baby out prematurely (this is usually the extreme case). If you are pregnant and gets covid, would suggest you call up your gynae to ask what you should do.