Added some stability improvements (hopefully), when receiving bad or null data from the server when not expecting it.
This commit is contained in:
parent
db17504ea0
commit
d805fec9b9
@ -201,22 +201,30 @@ async function perform_updates(
|
|||||||
) {
|
) {
|
||||||
if (changed_seed) {
|
if (changed_seed) {
|
||||||
initialize_elements();
|
initialize_elements();
|
||||||
console.info(`Seed changed to: ${current_seed}`);
|
console.debug(`Seed set to: ${current_seed}`);
|
||||||
} else {
|
} else {
|
||||||
if (changed_checks) {
|
if (changed_checks) {
|
||||||
update.refresh_checks(server_address).then((data) => {
|
update.refresh_checks(server_address).then((data) => {
|
||||||
|
if (data) {
|
||||||
update_breakdown_list(data, { entrances: false, checks: true });
|
update_breakdown_list(data, { entrances: false, checks: true });
|
||||||
update_summary_list(data, { entrances: false, checks: true });
|
update_summary_list(data, { entrances: false, checks: true });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (changed_entrances) {
|
if (changed_entrances) {
|
||||||
update.refresh_entrances(server_address).then((data) => {
|
update.refresh_entrances(server_address).then((data) => {
|
||||||
|
if (data) {
|
||||||
update_breakdown_list(data, { entrances: true, checks: false });
|
update_breakdown_list(data, { entrances: true, checks: false });
|
||||||
update_summary_list(data, { entrances: true, checks: false });
|
update_summary_list(data, { entrances: true, checks: false });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (changed_hints) {
|
if (changed_hints) {
|
||||||
update.refresh_hints(server_address).then((data) => update_hints(data));
|
update.refresh_hints(server_address).then((data) => {
|
||||||
|
if (data) {
|
||||||
|
update_hints(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user