Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: edge case when upgrading page (#4283)

X1a0t157ce7ac6977
diff --git a/packages/infra/src/blocksuite/index.ts b/packages/infra/src/blocksuite/index.ts
index 2610632022..791eb84d7c 100644
--- a/packages/infra/src/blocksuite/index.ts
+++ b/packages/infra/src/blocksuite/index.ts
@@ -506,7 +506,11 @@ export async function forceUpgradePages(
const schema = options.getSchema();
const oldVersions = versions.toJSON();
spaces.forEach((space: Doc) => {
- schema.upgradePage(oldVersions, space);
+ try {
+ schema.upgradePage(oldVersions, space);
+ } catch (e) {
+ console.error(`page ${space.guid} upgrade failed`, e);
+ }
});
const newVersions = getLatestVersions(schema);
meta.set('blockVersions', new YMap(Object.entries(newVersions)));