Commit 568f3ea
fix(databases): address PR review — use attribute.attribute and fix removal test
- resources/databases.ts: use `attribute.attribute` instead of `attribute.name`
in the non-indexed attribute findIndex (per cb1kenobi's suggestion; `attribute.name`
can be falsey for attributes that arrive with only the `attribute` field set).
- unitTests/resources/schemaMigrationFragility.test.js: fix removal regression test —
after `table()` updates in-memory Table.attributes, re-create the stale main-thread
state (still holding breed/age) before calling resetDatabases(), so the removal loop
in initStores() is actually exercised.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 8ccf8d6 commit 568f3ea
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
458 | 469 | | |
459 | 470 | | |
460 | 471 | | |
| |||
0 commit comments