mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
fix: buffer length 0 issue
This commit is contained in:
@@ -91,10 +91,13 @@ const DynamicBlocksuite = ({
|
||||
if (indexDBProvider) {
|
||||
(indexDBProvider as IndexedDBDocProvider)?.on('synced', async () => {
|
||||
const updates = await downloadWorkspace({ workspaceId });
|
||||
updates &&
|
||||
|
||||
if (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');
|
||||
// if after update, the space:meta is empty, then we need to get map with doc
|
||||
workspace.doc.getMap('space:meta');
|
||||
}
|
||||
|
||||
resolve(workspace);
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user