mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-09-19 23:47:57 +03:00
fix: edge case when upgrading page (#4283)
This commit is contained in:
parent
f9eea85577
commit
157ce7ac69
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user