mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
chore(editor): rename std.doc to std.store (#9596)
This commit is contained in:
@@ -20,17 +20,17 @@ export const insertDatabaseBlockCommand: Command<
|
||||
const service = std.getService('affine:database');
|
||||
if (!service) return;
|
||||
|
||||
const result = std.doc.addSiblingBlocks(
|
||||
const result = std.store.addSiblingBlocks(
|
||||
targetModel,
|
||||
[{ flavour: 'affine:database' }],
|
||||
place
|
||||
);
|
||||
if (result.length === 0) return;
|
||||
|
||||
service.initDatabaseBlock(std.doc, targetModel, result[0], viewType, false);
|
||||
service.initDatabaseBlock(std.store, targetModel, result[0], viewType, false);
|
||||
|
||||
if (removeEmptyLine && targetModel.text?.length === 0) {
|
||||
std.doc.deleteBlock(targetModel);
|
||||
std.store.deleteBlock(targetModel);
|
||||
}
|
||||
|
||||
next({ insertedDatabaseBlockId: result[0] });
|
||||
|
||||
Reference in New Issue
Block a user