mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
fix(editor): edgeless selected block is missing in the return of getSelectedBlockCommand (#11813)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { SurfaceSelection } from '@blocksuite/std';
|
||||
|
||||
import type { GetSelectionCommand } from './types';
|
||||
|
||||
export const getSurfaceSelectionCommand: GetSelectionCommand = (ctx, next) => {
|
||||
const currentSurfaceSelection = ctx.std.selection.filter(SurfaceSelection)[0];
|
||||
if (!currentSurfaceSelection) return;
|
||||
|
||||
next({ currentSurfaceSelection });
|
||||
};
|
||||
Reference in New Issue
Block a user