mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2024-12-26 23:00:09 +08:00
Fixed crashes if somehow market items are really broken (fixes #197)
This commit is contained in:
parent
754847ee88
commit
913dff68ef
@ -83,7 +83,7 @@ function CMarketSearchResult(row) {
|
||||
|
||||
this.appid = parseInt(match[1], 10);
|
||||
this.market_hash_name = decodeURIComponent(match[2]);
|
||||
this.image = row.find('.market_listing_item_img').attr('src').match(/^https?:\/\/[^\/]+\/economy\/image\/[^\/]+\//)[0];
|
||||
this.image = ((row.find('.market_listing_item_img').attr('src') || "").match(/^https?:\/\/[^\/]+\/economy\/image\/[^\/]+\//) || [])[0];
|
||||
this.price = parseInt(row.find('.market_listing_their_price .market_table_value span.normal_price').text().replace(/[^\d]+/g, ''), 10);
|
||||
this.quantity = parseInt(row.find('.market_listing_num_listings_qty').text().replace(/[^\d]+/g, ''), 10);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user