Adds variable declaration to prevent error whe TainacanExtraFilters is empty.

This commit is contained in:
Mateus Machado Luna 2020-01-28 09:34:25 -03:00
parent eb2e5c7149
commit c3b36af011
1 changed files with 5 additions and 2 deletions

View File

@ -100,8 +100,11 @@ Vue.component('tainacan-filter-numeric-list-interval', FilterNumericListInterval
Vue.component('tainacan-filter-date-interval', FilterDateInterval);
/* Registers Extra Filter Components passed to the TainacanExtraFilter */
for (let [extraFilter, extraFilterObject] of Object.entries(TainacanExtraFilters))
Vue.component(extraFilter, extraFilterObject);
var TainacanExtraFilters = TainacanExtraFilters;
if (TainacanExtraFilters != undefined) {
for (let [extraFilter, extraFilterObject] of Object.entries(TainacanExtraFilters))
Vue.component(extraFilter, extraFilterObject);
}
/* Filter Metadata Option forms */
Vue.component('tainacan-filter-form-numeric', FormFilterNumeric);