diff --git a/packages/plugin-outline-pane/src/views/tree.tsx b/packages/plugin-outline-pane/src/views/tree.tsx index 675f70c2b..8428ec944 100644 --- a/packages/plugin-outline-pane/src/views/tree.tsx +++ b/packages/plugin-outline-pane/src/views/tree.tsx @@ -40,7 +40,7 @@ export default class TreeView extends PureComponent<{ return; } const node = this.getTreeNodeFromEvent(e)?.node; - detecting?.capture(node as any); + node?.id && detecting?.capture(node.id); } private onClick = (e: ReactMouseEvent) => {