Skip to content

Commit

Permalink
#3786 fix getting valid attachment point logic for sugar
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlaStarla committed Jan 4, 2024
1 parent 9153412 commit d9896d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/ketcher-core/src/domain/entities/Sugar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ export class Sugar extends BaseMonomer {
return 'R2';
}

if (
otherMonomer.isAttachmentPointExistAndFree('R2') &&
this.isAttachmentPointExistAndFree('R1')
) {
return 'R1';
}

if (
!otherMonomer.isAttachmentPointExistAndFree('R1') &&
this.isAttachmentPointExistAndFree('R1')
Expand Down

0 comments on commit d9896d4

Please sign in to comment.