Skip to content

Commit

Permalink
item check
Browse files Browse the repository at this point in the history
  • Loading branch information
Markcreator committed Aug 14, 2018
1 parent 476e902 commit 4c36f4e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ function render() {
rewards = [];
rewards.push(ale.MissionInfo.missionReward.credits + " Credits");
var items = ale.MissionInfo.missionReward.items;
for(var y = 0; y < items.length; y++) {
var item = items[y];
var name = item.split("/")[item.split("/").length-1];
rewards.push(name);
if(items) {
for(var y = 0; y < items.length; y++) {
var item = items[y];
var name = item.split("/")[item.split("/").length-1];
rewards.push(name);
}
}

var output = [];
Expand Down

0 comments on commit 4c36f4e

Please sign in to comment.