After videos of David Dao, a medical doctor who in April was dragged kicking and screaming off an overbooked United Airlines plane, went viral and set off a global uproar, the outlook for United looked grim. Within days, the Twitter hashtag #BoycottUnited had been used over 3.5 million times.

Some took to Twitter to suggest new advertising slogans for United. “If we can’t beat out competitors, we’ll beat our customers” was one. “United Airlines: putting the hospital in hospitality” was another.

Critics excoriated United for its handling of the crisis and especially its embattled chief executive, Oscar Munoz, whose first public statements seemed to blame the 69-year-old doctor for refusing to give up his seat. Mr. Munoz had already contended with a heart attack and heart transplant a month after becoming chief executive in 2015. Scheduled to be named chairman in 2018, he agreed to rescind that provision in his contract and may have his pay docked by the board.

So when United reported second-quarter earnings last week, many investors feared that the results might go off a cliff just as the peak travel season was getting underway. But they were surprisingly robust: Revenue rose over 6 percent and profits shot up 49 percent. There was no sign of any boycott: The airline said it had 71 million passengers in the first half of the year, 4.2 percent more than the previous year.