fix: authorization token refresh

This commit is contained in:
alt0
2022-12-22 17:00:36 +08:00
parent 0853be36b3
commit 42c26da5eb
3 changed files with 6 additions and 2 deletions
@@ -92,7 +92,7 @@ const DynamicBlocksuite = ({
(indexDBProvider as IndexedDBDocProvider)?.on('synced', async () => {
const updates = await downloadWorkspace({ workspaceId });
if (updates.byteLength) {
if (updates && updates.byteLength) {
Workspace.Y.applyUpdate(workspace.doc, new Uint8Array(updates));
// if after update, the space:meta is empty, then we need to get map with doc
workspace.doc.getMap('space:meta');