Skip to content

Commit

Permalink
parse GA CVs with odd scope sets
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-adams committed May 12, 2014
1 parent ccb85ff commit 9d955e8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Panel/dsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,23 @@ function updateUI(section) {
newspot = newspot+1;
}

newspot = 0;
for (var row in gaCVs[2]){
if (gaCVs[2][row].indexOf('!')>=0){
newspot = gaCVs[2][row].substring(0,gaCVs[2][row].indexOf('!'))-1;
for (i=0;i<newspot;i++){gaCVsfixed[2][i]='0';}
gaCVs[2][row] = gaCVs[2][row].substring(gaCVs[2][row].indexOf('!')+1);
}
try{
gaCVsfixed[2][newspot] = typeof gaCVs[2] !== 'undefined' ? (typeof gaCVs[2][row] !== 'undefined' ? gaCVs[2][row].charAt(0) : '0') : '0';
}
catch(err){
console.log(err+' @ CV '+newspot);
}

newspot = newspot+1;
}

gaCVs = gaCVsfixed;

$.each(gaCVs[0],function(i,d){
Expand Down

0 comments on commit 9d955e8

Please sign in to comment.