Fixes as per PR comments

This commit is contained in:
Owen Stephens 2017-09-27 11:47:07 +01:00
parent e482878596
commit b88263bd74

View File

@ -79,13 +79,14 @@ $(function() {
while(thisVerParts.length < 3) while(thisVerParts.length < 3)
thisVerParts.push(0); thisVerParts.push(0);
while(latestVerParts.length < 3) while(latestVerParts.length < 3)
latestVersParts.push(0); latestVerParts.push(0);
for(var i=0; i<3; i++) { for(var i=0; i<3; i++) {
console.log(parseInt(latestVerParts[i],10)); var thisVerPartInt = parseInt(thisVerParts[i],10);
if(parseInt(thisVerParts[i],10) == parseInt(latestVerParts[i],10)) { var latestVerPartInt = parseInt(latestVerParts[i],10);
if(thisVerPartInt == latestVerPartInt) {
continue; continue;
} else if (parseInt(thisVerParts[i],10) > parseInt(latestVerParts[i],10)) { } else if (thisVerPartInt > latestVerPartInt) {
return false; return false;
} else { } else {
return true; return true;