浏览代码

throwing in hasNdbStructNtcCategories breaks non-mmcif files

Alexander Rose 4 年之前
父节点
当前提交
27ef44b833
共有 1 个文件被更改,包括 1 次插入1 次删除
  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');
     }