mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: catch and ignore page upgrade error (#5373)
This commit is contained in:
@@ -28,7 +28,12 @@ export async function migratePages(
|
||||
const oldVersions = versions?.toJSON() ?? {};
|
||||
|
||||
spaces.forEach((space: YDoc) => {
|
||||
schema.upgradePage(0, oldVersions, space);
|
||||
try {
|
||||
// Catch page upgrade error to avoid blocking the whole workspace migration.
|
||||
schema.upgradePage(0, oldVersions, space);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
schema.upgradeWorkspace(rootDoc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user