diff options
author | piernov <piernov@piernov.org> | 2016-05-08 14:58:13 +0200 |
---|---|---|
committer | piernov <piernov@piernov.org> | 2016-05-08 14:58:13 +0200 |
commit | 9c43e81e57cebceee5abc2e8897e7cf5631eff5b (patch) | |
tree | b7214a58a4742f4940657b3672723cb8bf4ed4f4 | |
parent | 44fea0c94df8f61ac1f31b8506cca0346e41bac9 (diff) | |
download | candybox-9c43e81e57cebceee5abc2e8897e7cf5631eff5b.tar.gz candybox-9c43e81e57cebceee5abc2e8897e7cf5631eff5b.tar.bz2 candybox-9c43e81e57cebceee5abc2e8897e7cf5631eff5b.tar.xz candybox-9c43e81e57cebceee5abc2e8897e7cf5631eff5b.zip |
Fix Inventory display on page load
-rw-r--r-- | js/shop.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -17,8 +17,9 @@ function displayShop(ret) { } function displayInventory(items) { - for(var i=0; i < items.length; i++) { - addItem(items[i]); + for(var key in items) { + if(items.hasOwnProperty(key)) + addItem(items[key]); } } |