feat: bump blocksuite (#5953)

This commit is contained in:
regischen
2024-02-29 14:33:50 +08:00
committed by GitHub
parent fa534869e1
commit d1e6b23e1a
121 changed files with 665 additions and 674 deletions

View File

@@ -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);
}

View File

@@ -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) {