Skip to content

Commit

Permalink
fix(playground): missing root model after refresh page (#6256)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkwolf authored Feb 21, 2024
1 parent 4fc8efe commit fd03a1d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/playground/apps/default/utils/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export async function mountDefaultPageEditor(workspace: Workspace) {
if (!target) {
throw new Error(`Failed to jump to page ${pageId}`);
}
target.load();
editor.page = target;
});

Expand Down
2 changes: 2 additions & 0 deletions packages/playground/apps/starter/data/multiple-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const multiEditor: InitFn = (workspace: Workspace, id: string) => {
if (!target) {
throw new Error(`Failed to jump to page ${pageId}`);
}
target.load();
editor.page = target;
});

Expand Down Expand Up @@ -77,6 +78,7 @@ export const multiEditorVertical: InitFn = (
if (!target) {
throw new Error(`Failed to jump to page ${pageId}`);
}
target.load();
editor.page = target;
});
app.append(editor);
Expand Down
1 change: 1 addition & 0 deletions packages/playground/apps/starter/utils/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export async function mountDefaultPageEditor(workspace: Workspace) {
if (!target) {
throw new Error(`Failed to jump to page ${pageId}`);
}
target.load();
editor.page = target;
});

Expand Down

0 comments on commit fd03a1d

Please sign in to comment.