"Modern Family" star Sarah Hyland is having fun with her character's pregnancy.

ADVERTISEMENT
The 27-year-old actress, who plays Haley Dunphy on the ABC sitcom, joked about the surprise plot line in an Instagram post Thursday following Wednesday's episode.

Hyland shared a photo of herself wearing a fake baby bump on the show's set. She referenced her character's growing belly in the caption.

"Well I guess the cat's outta the bag!!! Or more like the bump's outta the shirt!..... that was a horrible joke. I apologize," the star wrote.

Haley discovered she's pregnant during Wednesday's episode while visiting the hospital for a bumper car injury.

Hyland answered fan questions Wednesday on Instagram Stories, saying she's known about the story line for months.

"Before the season started. But. I had zero information on details!" the star said.

Hyland had teased a big surprise for Haley in an interview with The Hollywood Reporter in October after DeDe Pritchett (Shelley Long) died during the Oct. 24 episode.

FOLLOW REALITY TV WORLD ON THE ALL-NEW GOOGLE NEWS!
Reality TV World is now available on the all-new Google News app and website. Click here to visit our Google News page, and then click FOLLOW to add us as a news source!
"[It's a] bigger thing than the death," the actress said. "It was shock, that's for sure."

"There's a lot happening with Haley, but I can't say," she added.

"Modern Family" co-stars Ed O'Neill, Sofia Vergara, Julie Bowen, Ty Burrell, Ariel Winter and Nolan Gould.

It is unclear whether the show will continue after Season 10.