fix: first page id conflict (#3192)

This commit is contained in:
Alex Yang
2023-07-12 18:43:52 +08:00
committed by GitHub
parent ccbae6f496
commit 5b87d90ffe
4 changed files with 12 additions and 15 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { DebugLogger } from '@affine/debug';
import { initEmptyPage, initPageWithPreloading } from '@affine/env/blocksuite';
import {
DEFAULT_HELLO_WORLD_PAGE_ID,
DEFAULT_HELLO_WORLD_PAGE_ID_SUFFIX,
DEFAULT_WORKSPACE_NAME,
PageNotFoundError,
} from '@affine/env/constant';
@@ -42,7 +42,7 @@ export const LocalAdapter: WorkspaceAdapter<WorkspaceFlavour.LOCAL> = {
);
blockSuiteWorkspace.meta.setName(DEFAULT_WORKSPACE_NAME);
const page = blockSuiteWorkspace.createPage({
id: DEFAULT_HELLO_WORLD_PAGE_ID,
id: `${blockSuiteWorkspace.id}-${DEFAULT_HELLO_WORLD_PAGE_ID_SUFFIX}`,
});
if (runtimeConfig.enablePreloading) {
initPageWithPreloading(page).catch(err => {