mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-29 05:54:55 +03:00
chore: catch and ignore page upgrade error (#5373)
This commit is contained in:
parent
cfb77e8243
commit
ec7f73f168
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user