FIX: prevents error when loading tag groups (#8983)
This commit is contained in:
parent
d827430ea6
commit
9feace3388
|
@ -2,12 +2,14 @@
|
||||||
<label for="category-allowed-tags">{{i18n 'category.tags_allowed_tags'}}</label>
|
<label for="category-allowed-tags">{{i18n 'category.tags_allowed_tags'}}</label>
|
||||||
{{tag-chooser
|
{{tag-chooser
|
||||||
id="category-allowed-tags"
|
id="category-allowed-tags"
|
||||||
filterPlaceholder="category.tags_placeholder"
|
|
||||||
tags=category.allowed_tags
|
tags=category.allowed_tags
|
||||||
everyTag=true
|
everyTag=true
|
||||||
excludeSynonyms=true
|
excludeSynonyms=true
|
||||||
unlimitedTagCount=true
|
unlimitedTagCount=true
|
||||||
onChange=(action (mut category.allowed_tags))
|
onChange=(action (mut category.allowed_tags))
|
||||||
|
options=(hash
|
||||||
|
filterPlaceholder="category.tags_placeholder"
|
||||||
|
)
|
||||||
}}
|
}}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -45,8 +47,10 @@
|
||||||
{{tag-group-chooser
|
{{tag-group-chooser
|
||||||
id="category-required-tag-group"
|
id="category-required-tag-group"
|
||||||
tagGroups=category.required_tag_groups
|
tagGroups=category.required_tag_groups
|
||||||
|
options=(hash
|
||||||
maximum=1
|
maximum=1
|
||||||
filterPlaceholder="category.tag_group_selector_placeholder"
|
filterPlaceholder="category.tag_group_selector_placeholder"
|
||||||
|
)
|
||||||
}}
|
}}
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -47,7 +47,7 @@ export default MultiSelectComponent.extend(TagsMixin, {
|
||||||
).then(results => {
|
).then(results => {
|
||||||
if (results && results.length) {
|
if (results && results.length) {
|
||||||
return results.filter(r => {
|
return results.filter(r => {
|
||||||
return !this.tagGroups.includes(this.getValue(r));
|
return !makeArray(this.tagGroups).includes(this.getValue(r));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue