mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
refactor: use suspense in AppDefender (#1020)
This commit is contained in:
@@ -29,8 +29,9 @@ export const createWorkspaceUnit = async (params: WorkspaceUnitCtorParams) => {
|
||||
await setDefaultAvatar(blocksuiteWorkspace);
|
||||
workspaceUnit.update({ avatar: blocksuiteWorkspace.meta.avatar });
|
||||
}
|
||||
|
||||
await writeUpdatesToLocal(blocksuiteWorkspace);
|
||||
if (typeof window !== 'undefined') {
|
||||
await writeUpdatesToLocal(blocksuiteWorkspace);
|
||||
}
|
||||
|
||||
workspaceUnit.setBlocksuiteWorkspace(blocksuiteWorkspace);
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ export const createBlocksuiteWorkspace = (
|
||||
return new BlocksuiteWorkspace({
|
||||
room: workspaceId,
|
||||
defaultFlags: { enable_slash_menu: true },
|
||||
isSSR: typeof window === 'undefined',
|
||||
...workspaceOption,
|
||||
})
|
||||
.register(builtInSchemas)
|
||||
|
||||
Reference in New Issue
Block a user