SimeonGriggs / sanity-nextjs-preview

Sanity Studio Visual Editing examples for Next.js 14 App + Pages routers
https://sanity-nextjs-preview-two.vercel.app
81 stars 19 forks source link

Error with images in portableText #18

Open SamMorgan opened 7 months ago

SamMorgan commented 7 months ago

When editing images within a text block in presentation view I get the errors: "Cannot get the leaf node at path [] because it refers to a non-leaf node ..." and/or "Uncaught Error: Cannot get the descendant node at path [] because it refers to the root editor node instead ...".

To clarify further this field schema:

    {
        name: 'text',
        title: 'Text,
        type: 'array',
        of: [
            { type: 'block' },
            { type: 'image' }
        ]
    },