fix: localworkspace will request blob (#925)

This commit is contained in:
DiamondThree 2023-02-09 14:59:02 +08:00 committed by GitHub
parent 2bde086e28
commit 6327b5864d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,9 @@ import { setDefaultAvatar } from '../utils.js';
export const loadWorkspaceUnit = async (params: WorkspaceUnitCtorParams) => {
const workspaceUnit = new WorkspaceUnit(params);
const blocksuiteWorkspace = createBlocksuiteWorkspace(workspaceUnit.id);
const blocksuiteWorkspace = createBlocksuiteWorkspace(workspaceUnit.id, {
blobOptionsGetter: (k: string) => undefined,
});
await applyLocalUpdates(blocksuiteWorkspace);
@ -19,7 +21,9 @@ export const loadWorkspaceUnit = async (params: WorkspaceUnitCtorParams) => {
export const createWorkspaceUnit = async (params: WorkspaceUnitCtorParams) => {
const workspaceUnit = new WorkspaceUnit(params);
const blocksuiteWorkspace = createBlocksuiteWorkspace(workspaceUnit.id);
const blocksuiteWorkspace = createBlocksuiteWorkspace(workspaceUnit.id, {
blobOptionsGetter: (k: string) => undefined,
});
blocksuiteWorkspace.meta.setName(workspaceUnit.name);
if (!workspaceUnit.avatar) {
await setDefaultAvatar(blocksuiteWorkspace);