diff --git a/packages/ketcher-react/src/script/editor/tool/sgroup.ts b/packages/ketcher-react/src/script/editor/tool/sgroup.ts index 41f23875d4..b795318e90 100644 --- a/packages/ketcher-react/src/script/editor/tool/sgroup.ts +++ b/packages/ketcher-react/src/script/editor/tool/sgroup.ts @@ -442,7 +442,7 @@ class SGroupTool { } // TODO: handle click on an existing group? - if (id !== null || (selection && selection.atoms)) { + if (id !== null || selection?.atoms?.length) { this.editor.selection(selection) SGroupTool.sgroupDialog(this.editor, id, this.type) }