We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f7175d commit b457b11Copy full SHA for b457b11
packages/react-notion-x/src/utils.ts
@@ -45,10 +45,11 @@ export const getListNumber = (blockId: string, blockMap: BlockMap) => {
45
return
46
}
47
48
- return blockMap[blockId]?.value.type === 'numbered_list' &&
49
- blockMap[blockId]?.value.format?.list_start_index
50
- ? blockMap[blockId]?.value.format?.list_start_index
51
- : group.indexOf(blockId) + 1
+ const groupIndex = group.indexOf(blockId) + 1
+ const startIndex = blockMap[blockId]?.value.format?.list_start_index
+ return blockMap[blockId]?.value.type === 'numbered_list'
+ ? (startIndex ?? groupIndex)
52
+ : groupIndex
53
54
55
export const getListNestingLevel = (
0 commit comments