Skip to content

Commit 41b9151

Browse files
fix: numbered list item decorations missed on initial render (#2734)
* Fixed numbered list item decorations not being created on initial render * Updated screenshot
1 parent dac995c commit 41b9151

4 files changed

Lines changed: 3 additions & 4 deletions

File tree

packages/core/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ function getDecorations(
135135
// Find the start of the first change to limit traversal scope.
136136
// We only need to check from the change point forward, since earlier
137137
// blocks are unaffected and their mapped decorations remain correct.
138-
const range = tr.changedRange();
139-
if (!range) {
140-
return { decorations: nextDecorationSet };
141-
}
138+
// On init (no steps), changedRange() returns null — fall back to a
139+
// full scan so initial content gets indexed.
140+
const range = tr.changedRange() ?? { from: 0, to: tr.doc.nodeSize - 2 };
142141
const decorationsToAdd = [] as Deco[];
143142

144143
// Track blockGroups where we've verified a decoration match past the
44 Bytes
Loading
83 Bytes
Loading
98 Bytes
Loading

0 commit comments

Comments
 (0)