NEW YORK ( TheStreet) -- Office Depot ( ODP) reported a better-than-feared second-quarter loss, reducing the red ink compared with a year ago. Investors sighed a breath of relief, and sent shares of the chain climbing 6.8% to $5.05 in pre-market trading. During the quarter, Office Depot lost $18.7 million, or 7 cents a share, compared with a loss of $82.6 million, or 31 cents, in the year-ago period. Analysts were calling for a loss of 17 cents a share. This overshadowed weak sales that missed expectations, as demand remained soft both domestically and internationally. Sales declined 4.3% to $2.7 billion, while same-store sales slipped 1%. Earlier in the month, Office Depot walked away from a bid for a key Los Angeles County office supplies contract, citing "onerous" terms that would cause it to lose money on the deal. -Reported by Jeanine Poggi in New York. Follow TheStreet.com on Twitter and become a fan on Facebook.