Skip to content

Fix incompatibility with nextjs document patching (cannot read properties of undefined, reading .style) #1531

@matthias-pichler

Description

@matthias-pichler

Nextjs patches the global document to make SSR and SSG work. However it does not define the documentElement on document making this line:

https://github.com/ProseMirror/prosemirror-view/blob/83a400d0fd3702cb4819ae33e5451303909b5af4/src/browser.ts#L23

fail in nextjs dev mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions