Skip to content

Commit

Permalink
#2104 - JS error is thrown, when clicking on a canvas after right cli…
Browse files Browse the repository at this point in the history
…ck on a bond with "Data S-Group" tool selected (#2107)

Co-authored-by: Stanislav Permiakov <Stanislav.Permiakov@primark.onmicrosoft.com>
  • Loading branch information
St-Permiakov and Stanislav Permiakov authored Jan 18, 2023
1 parent e3dad28 commit a29fb07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ketcher-react/src/script/editor/tool/sgroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit a29fb07

Please sign in to comment.