refactor: use suspense in AppDefender (#1020)
This commit is contained in:
1 parent
eb1d4fe1f6
commit
34a3a99d62
6 files changed
+44
-47
No files matched your search
@@ -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