fix for client version upgrade
This commit is contained in:
parent
e03389909e
commit
81b3fecfd4
|
|
@ -201,7 +201,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
async function runCheck(product, version, uri, size, currentVersion) {
|
||||
function runCheck(product, version, uri, size, currentVersion) {
|
||||
|
||||
if (app.clientUpdating) {
|
||||
logger.debug("client is already updating; skipping")
|
||||
|
|
@ -209,18 +209,18 @@
|
|||
}
|
||||
|
||||
if(currentVersion === undefined) {
|
||||
currentVersion = await context.jamClient.ClientUpdateVersion();
|
||||
|
||||
if (!forceShow && (currentVersion == null || currentVersion.indexOf("Compiled")) > -1) {
|
||||
// this is a developer build; it doesn't make much sense to do an packaged update, so skip
|
||||
logger.debug("skipping client update check because this is a development build ('" + currentVersion + "')")
|
||||
return;
|
||||
}
|
||||
|
||||
// # strange client oddity: remove quotes, if found, from start and finish of version.
|
||||
if (currentVersion.indexOf('"') == 0 && currentVersion.lastIndexOf('"') == currentVersion.length - 1) {
|
||||
currentVersion = currentVersion.substring(1, currentVersion.length - 1);
|
||||
}
|
||||
context.jamClient.ClientUpdateVersion().then(function(currentVersion){
|
||||
if (!forceShow && (currentVersion == null || currentVersion.indexOf("Compiled")) > -1) {
|
||||
// this is a developer build; it doesn't make much sense to do an packaged update, so skip
|
||||
logger.debug("skipping client update check because this is a development build ('" + currentVersion + "')")
|
||||
return;
|
||||
}
|
||||
|
||||
// # strange client oddity: remove quotes, if found, from start and finish of version.
|
||||
if (currentVersion.indexOf('"') == 0 && currentVersion.lastIndexOf('"') == currentVersion.length - 1) {
|
||||
currentVersion = currentVersion.substring(1, currentVersion.length - 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
logger.debug("our client version: " + currentVersion + ", server client version: " + version);
|
||||
|
|
@ -284,7 +284,9 @@
|
|||
type: "GET",
|
||||
url: "/api/versioncheck?product=" + product + "&os=" + os,
|
||||
success: function (response) {
|
||||
runCheck(product, response.version, response.uri, response.size, currentVersion);
|
||||
if(JSON.stringify(response) !== "{}"){
|
||||
runCheck(product, response.version, response.uri, response.size, currentVersion);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
logger.error("Unable to do a client update check against /api/versioncheck");
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
if(!app) throw "app not found";
|
||||
|
||||
// makes window.jamClient / context.jamClient set to something non-null very early on
|
||||
console.log("____DEBUG everywhere", context.jamClient)
|
||||
context.JK.initJamClient(app);
|
||||
|
||||
updateScoringIntervals();
|
||||
|
|
|
|||
Loading…
Reference in New Issue