souvikinator / notion-to-md

Convert notion pages, block and list of blocks to markdown (supports nesting and custom parsing)
https://www.npmjs.com/package/notion-to-md
MIT License
1.08k stars 90 forks source link

fix: handle empty titles in toggle #40

Closed froger closed 2 years ago

froger commented 2 years ago

The toggle function don't support empty toggles.

Here the error on empty toggle:

// notion-to-md.js
                const toggle_summary = block.toggle.rich_text[0].plain_text;
TypeError: Cannot read properties of undefined (reading 'plain_text')

In this PR you will find:

souvikinator commented 2 years ago

Thanks for contribution 🙏 It's live in v2.5.0.