瀏覽代碼

Fix createModelProperty.isApplicable

dsehnal 4 年之前
父節點
當前提交
324820890a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/mol-model-props/common/custom-element-property.ts

+ 1 - 1
src/mol-model-props/common/custom-element-property.ts

@@ -61,7 +61,7 @@ namespace CustomElementProperty {
             type: builder.type || 'dynamic',
             defaultParams: {},
             getParams: (data: Model) => ({}),
-            isApplicable: (data: Model) => !!builder.isApplicable?.(data),
+            isApplicable: (data: Model) => !builder.isApplicable || !!builder.isApplicable(data),
             obtain: async (ctx: CustomProperty.Context, data: Model) => {
                 return await builder.getData(data, ctx);
             }