Commit 72116e2
fix: guard against corrupt __dbis__ entries crashing startup
Null-check decoded values from attributesDbi.getRange() in both
initStores and the table() function — RecordEncoder.decode returns null
on error (e.g. mismatched structon typedStructs after a version
mismatch), and the subsequent property accesses (value.name,
value.isPrimaryKey) would throw. Corrupt entries are now silently
skipped; RecordEncoder already logs the decode error.
Also guard databases.system before the 'in' check in
checkIfInstallIsSupported: if getDatabases() throws mid-scan,
loadedDatabases is already true but databases.system is never
populated, producing a TypeError on the next startup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent f847836 commit 72116e2
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| 509 | + | |
509 | 510 | | |
510 | 511 | | |
511 | 512 | | |
| |||
1104 | 1105 | | |
1105 | 1106 | | |
1106 | 1107 | | |
| 1108 | + | |
1107 | 1109 | | |
1108 | 1110 | | |
1109 | 1111 | | |
| |||
0 commit comments