Skip to content

Commit da9c9fc

Browse files
authored
Merge pull request #125 from khaaleoo/fix-#124-func-groupBlockContent-undefined-content
fix: handle nonexistent field: value
2 parents 2e3f8e2 + 6099de6 commit da9c9fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const groupBlockContent = (blockMap: BlockMapType): string[][] => {
1414
let index = -1;
1515

1616
Object.keys(blockMap).forEach(id => {
17-
blockMap[id].value.content?.forEach(blockId => {
17+
blockMap[id].value?.content?.forEach(blockId => {
1818
const blockType = blockMap[blockId]?.value?.type;
1919

2020
if (blockType && blockType !== lastType) {

0 commit comments

Comments
 (0)