Skip to content

Commit e852355

Browse files
author
Sergei Orlov
committed
🐛 Use older syntax to work with older Node versions
1 parent 05ea459 commit e852355

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/transformers/notion-block-to-markdown.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ exports.notionBlockToMarkdown = (block, lowerTitleLevel, depth = 0) =>
1919

2020
const isTableRow = p.startsWith("|") && p.endsWith("|")
2121

22-
const isCodeSnippetLine = block.paragraph?.text[0]?.plain_text?.startsWith("```")
22+
const isCodeSnippetLine =
23+
block.paragraph &&
24+
block.paragraph.text &&
25+
block.paragraph.text[0] &&
26+
block.paragraph.text[0].plain_text &&
27+
block.paragraph.text[0].plain_text.startsWith("```")
2328

2429
return acc
2530
.concat(p)

0 commit comments

Comments
 (0)