Skip to content

Commit

Permalink
Disable visualViewport in SSR stub
Browse files Browse the repository at this point in the history
  • Loading branch information
smoores-dev committed Dec 17, 2024
1 parent fa673b5 commit b800d65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hooks/useEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ export class ReactEditorView extends EditorView {
// to an empty object to prevent an error from being thrown, and then
// clean it up so that other isomorphic code doesn't get confused about
// whether there's a functioning global window object
globalThis.window ??= {};
globalThis.window ??= {
visualViewport: null,
};
super(place, {
state: EditorState.create({
schema: props.state.schema,
Expand Down

0 comments on commit b800d65

Please sign in to comment.