fix(type-error): subblock migrations type error#4492
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview When Reviewed by Cursor Bugbot for commit 911b217. Configure here. |
Greptile SummaryThis PR fixes a TypeScript build error in
Confidence Score: 5/5Safe to merge — the change is a targeted type-safety fix with no functional regressions on the happy path. The only observable behavioural change is that plain-record entries without a value key now produce value: null instead of omitting the property entirely, which is the more correct shape for BlockState subBlocks string. All other logic is preserved identically. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[migrateBlockSubblockIds] --> B{oldId in result?}
B -- No --> C[skip]
B -- Yes --> D{newId already in result?}
D -- Yes --> E[delete oldId and skip]
D -- No --> F[read oldEntry as unknown]
F --> G{isPlainRecord?}
G -- Yes --> H[resolve type from configuredType or oldEntry.type]
H --> I[value = hasOwn value ? oldEntry.value : null]
I --> J[assign spread oldEntry with id, type, value overrides]
G -- No --> K[assign id, configuredType or DEFAULT, value cast from scalar]
J --> L[delete result oldId]
K --> L
Reviews (1): Last reviewed commit: "fix(type-error): subblock migrations typ..." | Re-trigger Greptile |
Build error fix