mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
fix(editor): undefined selected elements (#9429)
This commit is contained in:
@@ -280,8 +280,8 @@ export function getCopilotSelectedElems(
|
|||||||
const copilotWidget = getEdgelessCopilotWidget(host);
|
const copilotWidget = getEdgelessCopilotWidget(host);
|
||||||
|
|
||||||
if (copilotWidget.visible) {
|
if (copilotWidget.visible) {
|
||||||
return (service.gfx.tool.currentTool$.peek() as CopilotTool)
|
const currentTool = service.gfx.tool.currentTool$.peek() as CopilotTool;
|
||||||
.selectedElements;
|
return currentTool?.selectedElements ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return service.selection.selectedElements;
|
return service.selection.selectedElements;
|
||||||
|
|||||||
Reference in New Issue
Block a user