Added some stability improvements (hopefully), when receiving bad or null data from the server when not expecting it.

This commit is contained in:
Ada Werefox 2024-04-25 22:40:22 -05:00
parent db17504ea0
commit d805fec9b9
1 changed files with 14 additions and 6 deletions

View File

@ -201,22 +201,30 @@ async function perform_updates(
) {
if (changed_seed) {
initialize_elements();
console.info(`Seed changed to: ${current_seed}`);
console.debug(`Seed set to: ${current_seed}`);
} else {
if (changed_checks) {
update.refresh_checks(server_address).then((data) => {
update_breakdown_list(data, { entrances: false, checks: true });
update_summary_list(data, { entrances: false, checks: true });
if (data) {
update_breakdown_list(data, { entrances: false, checks: true });
update_summary_list(data, { entrances: false, checks: true });
}
});
}
if (changed_entrances) {
update.refresh_entrances(server_address).then((data) => {
update_breakdown_list(data, { entrances: true, checks: false });
update_summary_list(data, { entrances: true, checks: false });
if (data) {
update_breakdown_list(data, { entrances: true, checks: false });
update_summary_list(data, { entrances: true, checks: false });
}
});
}
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);
}
});
}
}
}