Hardened root layout initialization and ghost fallback logic to resolve 500 errors during API downtime.
This commit is contained in:
@@ -77,28 +77,32 @@
|
||||
}
|
||||
let ae_acct = data[$slct.account_id];
|
||||
|
||||
$ae_api = {
|
||||
...$ae_api,
|
||||
...ae_acct.api
|
||||
};
|
||||
if (log_lvl > 1) {
|
||||
console.log(`$ae_api = `, $ae_api);
|
||||
}
|
||||
if (ae_acct) {
|
||||
$ae_api = {
|
||||
...$ae_api,
|
||||
...(ae_acct.api || {})
|
||||
};
|
||||
if (log_lvl > 1) {
|
||||
console.log(`$ae_api = `, $ae_api);
|
||||
}
|
||||
|
||||
$ae_loc = {
|
||||
...$ae_loc,
|
||||
...ae_acct.loc
|
||||
};
|
||||
if (log_lvl > 1) {
|
||||
console.log(`$ae_loc = `, $ae_loc);
|
||||
}
|
||||
$ae_loc = {
|
||||
...$ae_loc,
|
||||
...(ae_acct.loc || {})
|
||||
};
|
||||
if (log_lvl > 1) {
|
||||
console.log(`$ae_loc = `, $ae_loc);
|
||||
}
|
||||
|
||||
$slct = {
|
||||
...$slct,
|
||||
...ae_acct.slct
|
||||
};
|
||||
if (log_lvl > 1) {
|
||||
console.log(`$slct = `, $slct);
|
||||
$slct = {
|
||||
...$slct,
|
||||
...(ae_acct.slct || {})
|
||||
};
|
||||
if (log_lvl > 1) {
|
||||
console.log(`$slct = `, $slct);
|
||||
}
|
||||
} else {
|
||||
console.warn('ae_root +layout.svelte: ae_acct not found for account_id:', $slct.account_id);
|
||||
}
|
||||
|
||||
let flag_clear_idb: boolean = $state(false);
|
||||
|
||||
Reference in New Issue
Block a user