Skip to content

Commit

Permalink
Update main.js - fix for issue#46
Browse files Browse the repository at this point in the history
Fix for 
#46
  • Loading branch information
PeterVoronov authored Sep 19, 2023
1 parent 6fa1035 commit 9a40003
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ function main() {

function update() {
for (var i = 0; i < allRobotNames.length; i++) {
updateRobot(allRobots[allRobotNames[i]]);
//additional check, if delete nonexits robots is disabled in createRobotsObjects
if (allRobots.hasOwnProperty(allRobotNames[i]) && allRobots[allRobotNames[i]]) updateRobot(allRobots[allRobotNames[i]]);
}
}

Expand Down

0 comments on commit 9a40003

Please sign in to comment.