react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

External object instance (GitHub link) breaks when attributes is absent

Open Commandtechno opened this issue 2 years ago • 1 comments

Description

Pasting a GitHub link into Notion by default doesn't have an attributes property which makes the renderer ignore it

Couldn't figure out how to run it locally, so couldn't open a PR for this one (it is also late, and i should sleep)

Here's the line of code that ignores the attributes property:

https://github.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/components/eoi.tsx#L16

external_object_instance object on my page

not working

external_object_instance object on the demo page (https://react-notion-x-demo.transitivebullsh.it/e648a7762fee458bb3b50ae946cb3c86)

working

Notion Test Page ID

Page ID 767f227505f548a28efefbc5da8831ff

Notion Page URL https://grandiose-fireplace-47b.notion.site/eoi-test-767f227505f548a28efefbc5da8831ff

React Notion X Page URL https://react-notion-x-demo.transitivebullsh.it/767f227505f548a28efefbc5da8831ff

Commandtechno avatar May 04 '22 05:05 Commandtechno

I got it running locally on linux... will be opening a pull request shortly!

Commandtechno avatar May 04 '22 15:05 Commandtechno