From efb8c131aa6d98e865e7851ce735806561672c81 Mon Sep 17 00:00:00 2001 From: Roman Rodionov Date: Wed, 11 Sep 2024 16:12:33 +0200 Subject: [PATCH] Backmerge: #5470 - Export of diffrent mixed and alternatives peptides (with diffrent proportions and percents) works wrong (#5488) --- .../src/domain/serializers/ket/ketSerializer.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/ketcher-core/src/domain/serializers/ket/ketSerializer.ts b/packages/ketcher-core/src/domain/serializers/ket/ketSerializer.ts index 668a7e33b7..7ae2272cf8 100644 --- a/packages/ketcher-core/src/domain/serializers/ket/ketSerializer.ts +++ b/packages/ketcher-core/src/domain/serializers/ket/ketSerializer.ts @@ -714,11 +714,13 @@ export class KetSerializer implements Serializer { ); if (monomer instanceof AmbiguousMonomer) { - templateId = monomer.monomers.reduce( - (templateId, monomer) => - templateId + '_' + getMonomerUniqueKey(monomer.monomerItem), - '', - ); + templateId = + monomer.variantMonomerItem.id || + monomer.monomers.reduce( + (templateId, monomer) => + templateId + '_' + getMonomerUniqueKey(monomer.monomerItem), + '', + ); } else { templateId = monomer.monomerItem.props.id ||