Frankel, former "The Real Housewives of New York City" reality star and founder of the SkinnyGirl Cocktail line, came under fire in July when she posted a photo to her Instagram in her daughter's pajamas.
Tap to view if you're viewing on the news app.
The caption read: "This is my daughter's nightgown and PJ shorts. Think we're ready to start sharing clothes yet?"
Many said the photo set a bad example by not maintaining a healthy weight, while others said the criticism was too harsh.
The incident came up in Thursday's proceedings for Frankel's divorce from businessman Jason Hoppy, according to the New York Post. The conversation took place between Justice Ellen Gesmer and Allan Mayefsky, Frankel's lawyer.
"No more pajamas!" Gesmer said.
When Mayefsky explained that the post was made as a joke, Gesmer said she wasn't laughing, as the effect on Frankel's daughter could be long-lasting.
"It's not a joke," she said. "Her child is not a joke."
It has already been determined that Frankel and Hoppy will share custody for their daughter, according to the New York Daily News. Still to be determined is how their fortunes will be divided up. Frankel is worth an estimated $55 million.
Frankel did not comment about the conversation in court Thursday. When she was initially criticized, she responded on Twitter, "When ur 4 year old peanut says "mommy please put my dress on" & giggles uncontrollably, u do what ur told."
Click through the gallery above to see Frankel's looks through the years.