From f855031ae0a911f70e3887d6a83f30147f52285a Mon Sep 17 00:00:00 2001 From: Nikita Date: Mon, 31 Jul 2023 17:26:31 +0300 Subject: [PATCH] =?UTF-8?q?Backmerge:=20#2989=20=E2=80=93=20Error=20messag?= =?UTF-8?q?e=20appears=20when=20copy/paste=20structure=20with=20S-Group=20?= =?UTF-8?q?properties,=20Functional=20Groups=20and=20Salts=20and=20Solvent?= =?UTF-8?q?s=20(#3003)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ketcher-core/src/application/render/restruct/restruct.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ketcher-core/src/application/render/restruct/restruct.ts b/packages/ketcher-core/src/application/render/restruct/restruct.ts index eacb57766c..e3148cd359 100644 --- a/packages/ketcher-core/src/application/render/restruct/restruct.ts +++ b/packages/ketcher-core/src/application/render/restruct/restruct.ts @@ -621,7 +621,10 @@ class ReStruct { getAttachmentsPointsVBox(atomsIds: number[]): Box2Abs | null { let result: Box2Abs | null = null; for (const atomId of atomsIds) { - const reAtom = this.atoms.get(atomId)!; + const reAtom = this.atoms.get(atomId); + if (!reAtom) { + return null; + } const bbox = reAtom.getVBoxObjOfAttachmentPoint(this.render); if (bbox) { result = result ? Box2Abs.union(result, bbox) : bbox;