Sfoglia il codice sorgente

Fix createModelProperty.isApplicable

dsehnal 4 anni fa
parent
commit
324820890a
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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);
             }