Skip to content

Commit

Permalink
B OpenNebula#3167: set numbers version to int
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
  • Loading branch information
Jorge Lobo committed Nov 18, 2019
1 parent accdf68 commit 4d17741
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/sunstone/public/app/tabs/official-support-tab/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,24 @@ define(function(require) {
var message = false;

splitGitVersion.forEach(function(position, index){
var numberPosition = parseInt(position);
var numberLocalPosition = parseInt(splitGitLocalVersion[index]);

switch (index) {
case 0:
if(position > splitGitLocalVersion[index]){
if(numberPosition > numberLocalPosition){
message = true;
return;
}
break;
case 1:
if(position > splitGitLocalVersion[index] && major){
if(numberPosition > numberLocalPosition && major){
message = true;
return;
}
break;
case 2:
if(position > splitGitLocalVersion[index] && major && minor){
if(numberPosition > numberLocalPosition && major && minor){
message = true;
return;
}
Expand All @@ -76,7 +79,7 @@ define(function(require) {
break;
}

if(position === splitGitLocalVersion[index]){
if(numberPosition === numberLocalPosition){
switch (index) {
case 0:
major = true;
Expand Down

0 comments on commit 4d17741

Please sign in to comment.