mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
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>
|
||||
{{tag-chooser
|
||||
id="category-allowed-tags"
|
||||
filterPlaceholder="category.tags_placeholder"
|
||||
tags=category.allowed_tags
|
||||
everyTag=true
|
||||
excludeSynonyms=true
|
||||
unlimitedTagCount=true
|
||||
onChange=(action (mut category.allowed_tags))
|
||||
options=(hash
|
||||
filterPlaceholder="category.tags_placeholder"
|
||||
)
|
||||
}}
|
||||
</section>
|
||||
|
||||
|
@ -45,8 +47,10 @@
|
|||
{{tag-group-chooser
|
||||
id="category-required-tag-group"
|
||||
tagGroups=category.required_tag_groups
|
||||
maximum=1
|
||||
filterPlaceholder="category.tag_group_selector_placeholder"
|
||||
options=(hash
|
||||
maximum=1
|
||||
filterPlaceholder="category.tag_group_selector_placeholder"
|
||||
)
|
||||
}}
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -47,7 +47,7 @@ export default MultiSelectComponent.extend(TagsMixin, {
|
|||
).then(results => {
|
||||
if (results && results.length) {
|
||||
return results.filter(r => {
|
||||
return !this.tagGroups.includes(this.getValue(r));
|
||||
return !makeArray(this.tagGroups).includes(this.getValue(r));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user