Chyler Leigh as Alex, Floriana Lima as Maggie
Alex (Chyler Leigh) will meet Maggie’s (Floriana Lima) ex Emily (Hayley Sales) in Season 2, episode 17 of “Supergirl.” The CW

Maggie (Floriana Lima) will run into her former girlfriend Emily (Hayley Sales) in Season 2, episode 17 of “Supergirl.” And while running into one’s ex is almost always awkward, this encounter between the two appears to be more uncomfortable for the police detective because she’s with her current girlfriend, Alex, (Chyler Leigh) when she bumps into Emily.

“An ex-girlfriend shows up, and it’s a shocking moment for Maggie to run into her — while Alex is with her,” Lima told TVLine. “We are just walking outside of yoga class, and it was one of those moments where I was like, ‘Yeah, I’ve done that, run into an ex with a new partner!’”

Surprisingly, Alex is thrilled meeting Emily. “Alex is kind of like, ‘Oh, let’s go chat her up,’” Leigh told Entertainment Weekly last month of how her character reacts to the chance meeting. “I think there’s profiling thing that’s going on.”

READ: Is Tyler Hoechlin filming a new episode of “Supergirl”?

Alex’s interest in Emily leads her to discover her girlfriend’s rather dark past with her ex. “Alex is, you know, she’s Alex. She finds out what really happened between them and it’s a much deeper story, a darker story,” Leigh teased. “It’s a lovely episode for Floriana, just learning more about Maggie’s background and what’s gone on in hers, and how it really does level the playing field between the both of them. So there’s great development in that.”

In her interview with TVLine, Lima also said that fans will soon learn more about how Maggie moved on with her life after her dad kicked her out of their house after she was outed.

In Season 2, episode 13, Maggie admitted to Alex that she lied to her when she told her that her parents were supportive of her coming out.

“I had this friend when I was 14, Elisa Wilkey. We’d hang out in her parents’ basement, watching horror flicks and smoking cigarettes,” Maggie told Alex in the episode. “She was the first girl that I knew I liked in a way that is different. And I thought that she liked me, too. And so on Valentine’s Day, I put a card in her locker declaring my feelings and asking her to the dance. Well, she gave that card to her parents and they called my parents. That’s how I was outed. And then my dad kicked me out, and for three years and I had to live with an aunt for three years.”

“Supergirl” Season 2, episode 17, titled “Distant Sun,” airs on Monday, March 27 at 8 p.m. EST on The CW.