[dashboard] Prevent JS error on hit widget delete
@@ -1564,7 +1564,7 @@ ${ dashboard.layout_skeleton(suffix='search') }
<!-- ko if: widgetType() == 'hit-widget' -->
<!-- ko with: $parent -->
- <!-- ko if: counts().length > 0 -->
+ <!-- ko if: counts().length > 0 && $root.collection.getFacetById($parent.id()) -->
<span class="big-counter" data-bind="template: { name: 'counter-form', data: {counts: counts(), properties: $root.collection.getFacetById($parent.id()).properties }}"></span>
<!-- /ko -->
<!-- /ko -->
@@ -2059,7 +2059,9 @@ ${ dashboard.layout_skeleton(suffix='search') }
% endif
</div>
+ <!-- ko if: $root.collection.getFacetById($parent.id()) -->
<span class="big-counter" data-bind="template: { name: 'counter-form', data: {counts: counts(), properties: $root.collection.getFacetById($parent.id()).properties }}"></span>
+ <!-- /ko -->
</div>
<!-- /ko -->
</script>
