Browse Source

undefined score fix

visualizer
edoardoo 9 years ago
parent
commit
758568c033
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      public/scripts/functions.js

+ 3
- 1
public/scripts/functions.js View File

@ -38,7 +38,9 @@ function populateHoneycomb( honeyCells , index){
var honeyComb = document.getElementById("honeyComb");
var renderedHoneyComb = document.getElementById("renderedHoneyComb");
renderedHoneyComb.innerHTML="";
if( typeof honeyCells.score == "undefined"){
honeyCells.score = 0;
}
honeyComb.innerHTML = "<div class='honeycombIndex'>Index: "+index+"</div>";
honeyComb.innerHTML += "<div class='honeycombScore'>Score:"+honeyCells.score+"</div>";


Loading…
Cancel
Save