Switch to int comparison in version check

This commit is contained in:
Alex Liebowitz 2016-07-22 00:20:16 -04:00
parent 27341cd55e
commit 8b8bcc644c
2 changed files with 9 additions and 4 deletions

BIN
dist.zip

Binary file not shown.

View file

@ -144,11 +144,16 @@ lbry.getVersionInfo = function(callback) {
lbry.checkNewVersionAvailable = function(callback) {
lbry.call('version', {}, function(versionInfo) {
var maj, min, patch;
[maj, min, patch] = versionInfo.lbrynet_version.split('.');
var ver = versionInfo.lbrynet_version.split('.');
var remoteMaj, remoteMin, remotePatch;
[remoteMaj, remoteMin, remotePatch] = versionInfo.remote_lbrynet.split('.');
var maj = parseInt(ver[0]),
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) {
var newVersionAvailable = true;