From b4ff98499bc2367c568ae023076c90383c809bbd Mon Sep 17 00:00:00 2001 From: JonStargaryen <sebastian.bittrich@rcsb.org> Date: Tue, 20 Oct 2020 12:36:36 -0700 Subject: [PATCH] avoid overiding of entries for atom data --- src/mol-model-formats/structure/property/atoms/chem_comp.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mol-model-formats/structure/property/atoms/chem_comp.ts b/src/mol-model-formats/structure/property/atoms/chem_comp.ts index ca0ccd116..b97173404 100644 --- a/src/mol-model-formats/structure/property/atoms/chem_comp.ts +++ b/src/mol-model-formats/structure/property/atoms/chem_comp.ts @@ -56,7 +56,11 @@ export namespace ComponentAtom { const entries: Map<string, Entry> = new Map(); function addEntry(id: string) { - let e = new Entry(id); + // weird behavior when 'PRO' is requested - will report a single bond between N and H because a later operation would override real content + if (entries.has(id)) { + return entries.get(id)!; + } + const e = new Entry(id); entries.set(id, e); return e; } -- GitLab