Skip to content

Commit f46ea53

Browse files
kriszypclaude
andcommitted
fix(databases): set attributesUpdated on non-indexed attribute update path
When an existing non-indexed attribute was already present in existingAttributes (existingIdx >= 0) and got replaced by the splice, attributesUpdated was never set to true. As a result the schemaVersion bump and updatedAttributes() call at line 682 were skipped, leaving downstream code with stale property resolvers when a plain field's type/nullability changed via hot-reload. The add path (existingIdx < 0) was already correct; this brings the update path into parity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e14d516 commit f46ea53

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

resources/databases.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ function initStores(
629629
const existingIdx = existingAttributes.findIndex((ea) => ea.name === attribute.attribute);
630630
if (existingIdx >= 0) {
631631
existingAttributes.splice(existingIdx, 1, attribute);
632+
attributesUpdated = true;
632633
} else {
633634
existingAttributes.push(attribute);
634635
attributesUpdated = true;

0 commit comments

Comments
 (0)