Skip to content

Commit

Permalink
Refactor utils code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
lebedev committed May 30, 2015
1 parent a00f03f commit 2c4f5d2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/superhero/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ ui_utils.hideElem = function(elem, hide) {
}
};
ui_utils._parseVersion = function(isNewestCallback, isNotNewestCallback, failCallback, xhr) {
var match;
if ((match = xhr.responseText.match(/Godville UI\+ (\d+\.\d+\.\d+\.\d+)/))) {
var match = xhr.responseText.match(/Godville UI\+ (\d+\.\d+\.\d+\.\d+)/);
if (match) {
var temp_cur = ui_data.currentVersion.split('.'),
last_version = match[1],
temp_last = last_version.split('.'),
Expand All @@ -245,7 +245,6 @@ ui_utils._parseVersion = function(isNewestCallback, isNotNewestCallback, failCal
+temp_cur[2] < +temp_last[2] ? false :
+temp_cur[2] > +temp_last[2] ? true :
+temp_cur[3] < +temp_last[3] ? false : true;
worker.console.log(isNewest);
if (isNewest) {
if (isNewestCallback) {
isNewestCallback();
Expand Down

0 comments on commit 2c4f5d2

Please sign in to comment.