Skip to content

Commit b548076

Browse files
committed
#6471 - Removing peptide from sense/antisence chain cause unnessussary phosphate removal
1 parent 29ee05f commit b548076

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/ketcher-core/src/application/editor/modes/SequenceMode.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,8 @@ export class SequenceMode extends BaseMode {
866866
if (
867867
nodeBeforeSelection === nodeInSameChainBeforeSelection &&
868868
nodeBeforeSelection instanceof Nucleotide &&
869-
!(nodeInSameChainAfterSelection instanceof Nucleotide) &&
870-
!(nodeInSameChainAfterSelection instanceof Nucleoside)
869+
selectionStartNode instanceof Nucleoside &&
870+
(!nodeAfterSelection || nodeAfterSelection instanceof EmptySequenceNode)
871871
) {
872872
// delete phosphate from last nucleotide
873873
modelChanges.merge(

0 commit comments

Comments
 (0)