fix: std might not be ready when onLoad invoked (#6075)

This commit is contained in:
Lye Hongtao
2024-03-12 16:02:42 +08:00
committed by GitHub
parent 83e1217f61
commit d5386bee41
@@ -88,6 +88,7 @@ const PageDetailEditorMain = memo(function PageDetailEditorMain({
if (onLoad) {
// Invoke onLoad once the editor has been mounted to the DOM.
editor.updateComplete
.then(() => editor.host.updateComplete)
.then(() => {
disposableGroup.add(onLoad(page, editor));
})