Switch to int comparison in version check
This commit is contained in:
parent
27341cd55e
commit
8b8bcc644c
2 changed files with 9 additions and 4 deletions
BIN
dist.zip
BIN
dist.zip
Binary file not shown.
13
js/lbry.js
13
js/lbry.js
|
@ -144,11 +144,16 @@ lbry.getVersionInfo = function(callback) {
|
||||||
|
|
||||||
lbry.checkNewVersionAvailable = function(callback) {
|
lbry.checkNewVersionAvailable = function(callback) {
|
||||||
lbry.call('version', {}, function(versionInfo) {
|
lbry.call('version', {}, function(versionInfo) {
|
||||||
var maj, min, patch;
|
var ver = versionInfo.lbrynet_version.split('.');
|
||||||
[maj, min, patch] = versionInfo.lbrynet_version.split('.');
|
|
||||||
|
|
||||||
var remoteMaj, remoteMin, remotePatch;
|
var maj = parseInt(ver[0]),
|
||||||
[remoteMaj, remoteMin, remotePatch] = versionInfo.remote_lbrynet.split('.');
|
min = parseInt(ver[1]),
|
||||||
|
patch = parseInt(ver[2]);
|
||||||
|
|
||||||
|
var remoteVer = versionInfo.remote_lbrynet.split('.');
|
||||||
|
var remoteMaj = parseInt(remoteVer[0]),
|
||||||
|
remoteMin = parseInt(remoteVer[1]),
|
||||||
|
remotePatch = parseInt(remoteVer[2]);
|
||||||
|
|
||||||
if (maj < remoteMaj) {
|
if (maj < remoteMaj) {
|
||||||
var newVersionAvailable = true;
|
var newVersionAvailable = true;
|
||||||
|
|
Loading…
Reference in a new issue