From 19b3e381a7a5f1b482ace5ae0e0aa2d894e39a21 Mon Sep 17 00:00:00 2001 From: Rolf Koenders Date: Sat, 30 Jul 2016 20:50:50 +0200 Subject: [PATCH] Hide items with item count of 0 (#113) --- js/main.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/js/main.js b/js/main.js index 8346207..2a811ff 100644 --- a/js/main.js +++ b/js/main.js @@ -310,13 +310,15 @@ var mapView = { out = '
'; for (var i = 0; i < current_user_bag_items.length; i++) { - out += '

' + - self.itemsArray[current_user_bag_items[i].inventory_item_data.item.item_id] + - '
Count: ' + - (current_user_bag_items[i].inventory_item_data.item.count || 0) + - '
'; + if(current_user_bag_items[i].inventory_item_data.item.count > 0) { + out += '

' + + self.itemsArray[current_user_bag_items[i].inventory_item_data.item.item_id] + + '
Count: ' + + (current_user_bag_items[i].inventory_item_data.item.count || 0) + + '
'; + } } out += '
'; var nth = 0;