mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 18:41:52 +08:00
refactor(editor): job should not rely on doc collection directly (#9488)
This commit is contained in:
@@ -84,7 +84,15 @@ export async function createDefaultDocCollection() {
|
||||
// debug info
|
||||
window.collection = collection;
|
||||
window.blockSchemas = AffineSchemas;
|
||||
window.job = new Job({ collection });
|
||||
window.job = new Job({
|
||||
schema: collection.schema,
|
||||
blobCRUD: collection.blobSync,
|
||||
docCRUD: {
|
||||
create: (id: string) => collection.createDoc({ id }),
|
||||
get: (id: string) => collection.getDoc(id),
|
||||
delete: (id: string) => collection.removeDoc(id),
|
||||
},
|
||||
});
|
||||
window.Y = DocCollection.Y;
|
||||
|
||||
return collection;
|
||||
|
||||
Reference in New Issue
Block a user