Skip to content

Commit

Permalink
fix(core): fix no page root error (#9190)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN authored Dec 18, 2024
1 parent 2ceb6e9 commit c31e9fd
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,17 @@ export const BlockSuiteEditor = (props: EditorProps) => {
setIsLoading(false);
return;
}
const disposable = props.page.slots.rootAdded.once(() => {
setIsLoading(false);
});
window.setTimeout(() => {
const timer = setTimeout(() => {
disposable.dispose();
setError(new NoPageRootError(props.page));
}, 20 * 1000);
const disposable = props.page.slots.rootAdded.once(() => {
setIsLoading(false);
clearTimeout(timer);
});
return () => {
disposable.dispose();
clearTimeout(timer);
};
}, [props.page]);

Expand Down

0 comments on commit c31e9fd

Please sign in to comment.