mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat: bump blocksuite (#5953)
This commit is contained in:
@@ -30,7 +30,7 @@ export async function migratePages(
|
||||
spaces.forEach((space: YDoc) => {
|
||||
try {
|
||||
// Catch page upgrade error to avoid blocking the whole workspace migration.
|
||||
schema.upgradePage(0, oldVersions, space);
|
||||
schema.upgradeDoc(0, oldVersions, space);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export function checkWorkspaceCompatibility(
|
||||
}
|
||||
|
||||
// exit if no pages
|
||||
if (!workspace.meta.pages?.length) {
|
||||
if (!workspace.meta.docs?.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export function checkWorkspaceCompatibility(
|
||||
|
||||
// TODO: Catch compatibility error from blocksuite to show upgrade page.
|
||||
// Temporarily follow the check logic of blocksuite.
|
||||
if ((workspace.meta.pages?.length ?? 0) <= 1) {
|
||||
if ((workspace.meta.docs?.length ?? 0) <= 1) {
|
||||
try {
|
||||
workspace.meta.validateVersion(workspace);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user