Skip to content

Commit

Permalink
Version check fix compare logic
Browse files Browse the repository at this point in the history
  • Loading branch information
alpha0010 authored Jun 1, 2022
1 parent 7dd7b7f commit ad56754
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion templates/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,12 @@
function isNewer(oldV, newV) {
var oldP = parseVersion(oldV);
var newP = parseVersion(newV);
return newP[0] > oldP[0] || newP[1] > oldP[1] || newP[2] > oldP[2];
for (var i = 0; i < 3; ++i) {
if (newP[i] !== oldP[i]) {
return newP[i] > oldP[i];
}
}
return false;
}

function clearFiles() {
Expand Down

0 comments on commit ad56754

Please # to comment.