Sfoglia il codice sorgente

throwing in hasNdbStructNtcCategories breaks non-mmcif files

Alexander Rose 4 anni fa
parent
commit
27ef44b833
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/extensions/dnatco/confal-pyramids/property.ts

+ 1 - 1
src/extensions/dnatco/confal-pyramids/property.ts

@@ -74,7 +74,7 @@ export namespace ConfalPyramids {
     }
 
     function hasNdbStructNtcCategories(model: Model): boolean {
-        if (!MmcifFormat.is(model.sourceData)) throw new Error('Data format must be mmCIF');
+        if (!MmcifFormat.is(model.sourceData)) return false;
         const names = (model.sourceData).data.frame.categoryNames;
         return names.includes('ndb_struct_ntc_step') && names.includes('ndb_struct_ntc_step_summary');
     }