mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 03:33:06 +08:00
feat: seperate createDoc and createStore (#11182)
This commit is contained in:
@@ -4,8 +4,8 @@ import * as Y from 'yjs';
|
||||
import type { InitFn } from './utils.js';
|
||||
|
||||
export const versionMismatch: InitFn = (collection: Workspace, id: string) => {
|
||||
const doc = collection.createDoc({ id });
|
||||
const tempDoc = collection.createDoc({ id: 'tempDoc' });
|
||||
const doc = collection.createDoc(id).getStore({ id });
|
||||
const tempDoc = collection.createDoc('tempDoc').getStore();
|
||||
doc.load();
|
||||
|
||||
tempDoc.load(() => {
|
||||
|
||||
Reference in New Issue
Block a user