fix: page meta is undefined (#2734)

This commit is contained in:
Himself65
2023-06-09 01:19:16 +08:00
committed by GitHub
parent 227174db1b
commit fc9a9f479b
3 changed files with 10 additions and 19 deletions
@@ -66,9 +66,8 @@ const EditorWrapper = memo(function EditorWrapper({
const pageSettingAtom = pageSettingFamily(pageId);
const pageSetting = useAtomValue(pageSettingAtom);
const currentMode =
pageSetting?.mode ?? DEFAULT_HELLO_WORLD_PAGE_ID === pageId
? 'edgeless'
: 'page';
pageSetting?.mode ??
(DEFAULT_HELLO_WORLD_PAGE_ID === pageId ? 'edgeless' : 'page');
const setEditor = useSetAtom(rootCurrentEditorAtom);
assertExists(meta);