mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 13:38:49 +08:00
refactor(editor): reduce getService (#10100)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import type { Command } from '@blocksuite/block-std';
|
||||
|
||||
import { SurfaceBlockService } from '../surface-service';
|
||||
|
||||
/**
|
||||
* Re-associate bindings for block that have been converted.
|
||||
*
|
||||
@@ -11,7 +13,7 @@ export const reassociateConnectorsCommand: Command<{
|
||||
newId: string;
|
||||
}> = (ctx, next) => {
|
||||
const { oldId, newId } = ctx;
|
||||
const service = ctx.std.getService('affine:surface');
|
||||
const service = ctx.std.get(SurfaceBlockService);
|
||||
if (!oldId || !newId || !service) {
|
||||
next();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user