mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: do not show #uncategorized in category drop if setting is disabled (#6856)
This commit is contained in:
parent
6e7b383ed6
commit
25269a37aa
@ -159,6 +159,16 @@ export default ComboBoxComponent.extend({
|
||||
}
|
||||
|
||||
let results = Discourse.Category.search(filter);
|
||||
|
||||
if (!this.siteSettings.allow_uncategorized_topics) {
|
||||
results = results.filter(result => {
|
||||
return (
|
||||
result.id !==
|
||||
Discourse.Site.currentProp("uncategorized_category_id")
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
results = results.sort((a, b) => {
|
||||
if (a.parent_category_id && !b.parent_category_id) {
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user