From ab15d96efe9759a1ccd575dfb82e53f9c4ce8e45 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Thu, 30 Jun 2016 01:27:31 -0400 Subject: [PATCH] Fix version check logic (Pt. 2) --- dist.zip | Bin 2465503 -> 2465539 bytes js/lbry.js | 14 +++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dist.zip b/dist.zip index 79f08fd087642056c04554072064d1a3a0a859e1..0ea7006152d6ce8e97ba566ac44991d0bc5cda69 100644 GIT binary patch delta 6527 zcmZWu2|SeB`=7Cl8CwhnGh-WbN?A(_g`!9ZX`$^35keSilE_j-WI5T&P4||qq%t8z zUAH1psf$}er3GCoX(7M&yu+COe?G^1p5^;I&pFRC?|II6QJ+IRd?SaLK36EaB13DL zP)@}qx36^Uad|s~Ou?A&X9I~1)u==jis!zN%`TDzOm>l-HH_&bSyG8yOR7+CAR=nw zgt#?v!pcgB=*Sc1cI1hiR>TNyXq5=92XRx=MY*Zzq~rz2uyP&ASg5!hZmJ_a6>^q< zI@d{RN;wrF&S-om$`c%Ig+;^(=m(Q}TqkLgcv7fRM^cC7*GcLK{@^<40CHkiPpTB2 z4%i+s>>Ek$^U=tX$K$Gzj zvE7>RPKlV_G?lK2CP!PvtaZ@j@i(ztToj;1R>aLGxsfxak%$>cHjzP-ZHLGaa%ghr zJh@38uF@i_z=#7tN(Aj9Vvflp>5Y1_jX9cNriP7jj46^(*odNlICLY57!jMmcWx9W zccn39_^gy5<~P|EOdniDB0Qi$W6MG3_@56)1^ zScntVMER3~CYo&&YlKSjZ>L~G92*kYki>=*Hl(pJ2OBcjki`ZS8*}S3_GZv!;XlcAJm`UBx{?^CSbc(?A&dZ-*>qV6q3z=E&my{d3@VBGvJhtiL7q_P zGPUpDYU-3}j3|`KJQf-J=qkf&S%h^RO}{CRw%$OJ{87^CjQ>(<$yz7-xbCSRAFOT8 z_;syIRL@z{6a7K^-b>4DuQiOOjdJUyrE@lAlst%RuCk3Rm5)}Rw|mRcj==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?-7YUy)v`T14;Xy(4&nw&)mwvzJfM{DK0!C*TAG zlbT`uF%%zq?K+SsVe0{4j0aE?gamSdIlXzygo9A;;God32^Yc0fbrE^)PNJ_DQZ!N zEJ&JgFjp`LB@Z2i@jE66|1n>K@t%MQJkm4F%Wq=9T!fRD@OB>1(8fn!&nHK8R7y$X RS7bl>T`^TmEII@r>3@EaCA= 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') {