Fix version check logic (Pt. 2)
This commit is contained in:
parent
b38b069034
commit
ab15d96efe
2 changed files with 13 additions and 1 deletions
BIN
dist.zip
BIN
dist.zip
Binary file not shown.
14
js/lbry.js
14
js/lbry.js
|
@ -142,7 +142,19 @@ lbry.checkNewVersionAvailable = function(callback) {
|
|||
var remoteMaj, remoteMin, remotePatch;
|
||||
[remoteMaj, remoteMin, remotePatch] = versionInfo.remote_lbrynet.split('.');
|
||||
|
||||
var newVersionAvailable = !(maj >= remoteMaj && min >= remoteMin && patch >= remotePatch);
|
||||
if (maj < remoteMaj) {
|
||||
var newVersionAvailable = true;
|
||||
} else if (maj == remoteMaj) {
|
||||
if (min < remoteMin) {
|
||||
var newVersionAvailable = true;
|
||||
} else if (min == remoteMin) {
|
||||
var newVersionAvailable = (patch < remotePatch);
|
||||
} else {
|
||||
var newVersionAvailable = false;
|
||||
}
|
||||
} else {
|
||||
var newVersionAvailable = false;
|
||||
}
|
||||
callback(newVersionAvailable);
|
||||
}, function(err) {
|
||||
if (err.fault == 'NoSuchFunction') {
|
||||
|
|
Loading…
Add table
Reference in a new issue