My boyfriend is having a baby with someone else

Hi guys,

I’ve been dating someone for 2 months and the person my boyfriend hooked up with a month before we met just told him she’s pregnant. I don’t know what to do. I really like him but this is not what I was envisioning. I’m only 22 and always said I wasn’t ready for kids or wanted to date anyone with children. I feel like I’ll be making a mistake if I break it off with him, but I don’t know ☹️