use 1ms setTimeout calls to send initial requests for game score and artifact details
as part of the munge code cleanups, a safety check was added to the munge searches. if no munge sets can be found, an exception is thrown and no requests are sent. if these requests are posted as part of the regular IITC boot process, these exceptions cause IITC to fail to load. this is a quick and safe fix
This commit is contained in:
parent
851cde4745
commit
b5d1cbbfdf
@ -20,7 +20,8 @@ window.artifact.setup = function() {
|
|||||||
|
|
||||||
addResumeFunction(artifact.idleResume);
|
addResumeFunction(artifact.idleResume);
|
||||||
|
|
||||||
artifact.requestData();
|
// move the initial data request onto a very short timer. prevents thrown exceptions causing IITC boot failures
|
||||||
|
setTimeout (artifact.requestData, 1);
|
||||||
|
|
||||||
artifact._layer = new L.LayerGroup();
|
artifact._layer = new L.LayerGroup();
|
||||||
addLayerGroup ('Artifacts (Jarvis shards)', artifact._layer, true);
|
addLayerGroup ('Artifacts (Jarvis shards)', artifact._layer, true);
|
||||||
|
@ -6,7 +6,8 @@ window.updateGameScoreFailCount = 0;
|
|||||||
|
|
||||||
window.updateGameScore = function(data) {
|
window.updateGameScore = function(data) {
|
||||||
if(!data) {
|
if(!data) {
|
||||||
window.postAjax('getGameScore', {}, window.updateGameScore);
|
// move the postAjax call onto a very short timer. this way, if it throws an exception, it won't prevent IITC booting
|
||||||
|
setTimeout (function() { window.postAjax('getGameScore', {}, window.updateGameScore); }, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user