Prechádzať zdrojové kódy

lookup error safeguard

Yana Rose 4 rokov pred
rodič
commit
5c41642549
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/viewer/helpers/superpose/color.ts

+ 1 - 1
src/viewer/helpers/superpose/color.ts

@@ -26,7 +26,7 @@ export function SuperposeColorTheme(ctx: ThemeDataContext, props: {}): ColorThem
         if (StructureElement.Location.is(location)) {
             const asymId = StructureProperties.chain.label_asym_id(location);
             const seqId = StructureProperties.residue.label_seq_id(location);
-            if (colorLookup[asymId]?.has(seqId) ) {
+            if (colorLookup?.[asymId]?.has(seqId)) {
                 if (colorLookup[asymId]?.get(seqId) !== undefined) {
                     colorCode = colorLookup[asymId]?.get(seqId);
                 }