mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-20 03:21:45 +08:00
fix(workspace): avoid data loss (hot-fix) (#6114)
This commit is contained in:
@@ -19,6 +19,13 @@ export function createSQLiteStorage(workspaceId: string): SyncStorage {
|
||||
);
|
||||
|
||||
if (update) {
|
||||
if (
|
||||
update.byteLength === 0 ||
|
||||
(update.byteLength === 2 && update[0] === 0 && update[1] === 0)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
data: update,
|
||||
state: encodeStateVectorFromUpdate(update),
|
||||
|
||||
Reference in New Issue
Block a user