fix in updateVersion with tests
This commit is contained in:
parent
a7cba1197a
commit
9c24b45f4c
4 changed files with 12 additions and 8 deletions
|
|
@ -26,11 +26,10 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
|||
var latestVersion = data[0].name.replace('v', '').split('.').map(toInt);
|
||||
var currentVersion = copay.version.split('.').map(toInt);
|
||||
if (currentVersion[0] < latestVersion[0]){
|
||||
$scope.updateVersion = 'error';
|
||||
$scope.updateVersion = {class: 'error', version:data[0].name};
|
||||
} else if (currentVersion[0] == latestVersion[0] && currentVersion[1] < latestVersion[1]) {
|
||||
$scope.updateVersion = 'info';
|
||||
} else
|
||||
$scope.updateVersion = 'ok';
|
||||
$scope.updateVersion = {class: 'info', version:data[0].name};
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue