fix(core): temporary remove blockVersions assertion (#4285)

This commit is contained in:
LongYinan 2023-09-08 00:45:07 -07:00 committed by GitHub
parent b261d97ed2
commit 05c27ed164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,5 @@
import { WorkspaceFlavour } from '@affine/env/workspace';
import { rootWorkspacesMetadataAtom } from '@affine/workspace/atom';
import { assertExists } from '@blocksuite/global/utils';
import { getActiveBlockSuiteWorkspaceAtom } from '@toeverything/infra/__internal__/workspace';
import {
currentPageIdAtom,
@ -36,7 +35,9 @@ export const loader: LoaderFunction = async args => {
const workspace = await rootStore.get(workspaceAtom);
return (() => {
const blockVersions = workspace.meta.blockVersions;
assertExists(blockVersions, 'blockVersions should not be null');
if (!blockVersions) {
return true;
}
for (const [flavour, schema] of workspace.schema.flavourSchemaMap) {
if (blockVersions[flavour] !== schema.version) {
return true;