Skip to content

Conversation

khaaleoo
Copy link
Contributor

This error occurs because there are non-existent value fields in the response.

Screenshot 2024-10-28 at 14 14 31

@ilhamwahabi
Copy link

May I know when this fix will be released? I'm also got this issue and make my website crashed, so definitely need this.

Thanks for your help.

@dimitrisraptis96
Copy link

I've fixed it by removing attributes with role: "none" from the response before passing it to the blockMap prop of the NotionRenderer. I used this simple function:

function removeNoneRoles(blocks) {
    return Object.fromEntries(
        Object.entries(blocks).filter(([_, value]) => value.role !== 'none')
    );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants