Has the retail sector really been crippled by the coronavirus outbreak? Judging by the far-better-than-expected Q2 results from clothing-store operator Gap (GPS -3.83%), which were released after market hours on Thursday, the answer might be "no." 

For the quarter, the company booked net sales of just under $3.28 billion, down 18% on a year-over-year basis. Rather counterintuitively, comparable sales were up by 13%. Gap said this was due to the growth of its eCommerce business.

Interior of a Gap store.

Image source: Gap.

In terms of the bottom line, the company posted a net loss of $62 million ($0.17 per share), sharply contrasting with the $168 million profit it earned in Q2 2019. Yet, on average, analysts were expecting only $2.91 billion in net sales, and a far steeper bottom-line loss of $0.41 per share.

A sales decrease and flip into the red on the bottom line were entirely expected, given the widespread closures the company -- which still has a heavy bricks-and-mortar presence -- endured during the quarter as the coronavirus pandemic spread.

Those online sales did much to mitigate the damage. In the press release detailing the results, Gap quoted its CEO Sonia Syngal as saying that success in that segment is "demonstrating our ability to pivot to a digitally led culture."

As with many other retailers coping with the continued uncertainty of the coronavirus, Gap's crystal ball is cloudy -- the company didn't proffer guidance for its current quarter or fiscal year.

Investors still seem concerned with how the company might weather the pandemic, however. In after-hours trading on Thursday, the company's stock was trading down by 2.3%.