Ibsen changed the ending of his play A Doll's House in response to outside pressure. To be specific, a theater in Germany refused to stage the play unless Ibsen Nora gave Torvald another change to change.

The original ending is the one that we almost always see/read now, in which Nora just walks out.

To have a woman walk out on her husband and her children was essentially unheard of in nineteenth-century society. When the play was in rehearsal in Germany, the actress who was to play Nora refused to take the part unless the ending was changed. Even though he did not want to do so, Ibsen wrote another ending to the play. He had Nora return home to give Torvald another chance. Ibsen did not like this alternate ending, though, and the original ending, Nora's leaving and slamming the door behind her, is the one more commonly performed.