splitbee / react-notion

A fast React renderer for Notion pages
https://react-notion.com
MIT License
2.85k stars 149 forks source link

react-notion crashes when rendering untitled toggle block #120

Closed peguimasid closed 2 months ago

peguimasid commented 4 months ago

Library Crashes When Rendering Untitled Toggle Block

Description:

Encountering a crash in the library when attempting to render a toggle block without a title (i.e., only with the placeholder "Toggle").

Problem:

The application crashes with a TypeError: Cannot read properties of undefined (reading 'title') when attempting to render a toggle block without a specified title.

Reproduction Steps:

  1. Visit the original Notion page containing a toggle block without a title: Original Notion Page
  2. Attempt to render the page using React Notion: Rendered Page

Expected Behavior:

The library should handle toggle blocks without titles gracefully and avoid crashing the application.

Error Screenshot:

Screenshot 2024-03-21 at 11 57 30 AM