FIX: sub-categories were listed in parent category dropdown

This commit is contained in:
Arpit Jalan 2015-11-18 15:38:00 +05:30
parent 1be4b6a8f5
commit 0ede6b5ed6
1 changed files with 6 additions and 4 deletions

View File

@ -28,10 +28,12 @@ export default ComboboxView.extend({
@on("init")
@observes("site.sortedCategories")
_updateCategories() {
const categories = Discourse.SiteSettings.fixed_category_positions_on_create ?
Discourse.Category.list() :
Discourse.Category.listByActivity();
this.set('categories', categories);
if (!this.get('categories')) {
const categories = Discourse.SiteSettings.fixed_category_positions_on_create ?
Discourse.Category.list() :
Discourse.Category.listByActivity();
this.set('categories', categories);
}
},
@computed("rootNone")