FIX: New general category changes preventing topic create (#18459)
* FIX: New general category changes preventing topic create Follow up to: #18383 The logic in the previous commit was checking for null, but we are seeding the SiteSetting.general_category_id with an id of -1 so we need to check for a positive value as well as checking for null. See: https://meta.discourse.org/t/240661 * Add js test for presence of category… dropdown option
This commit is contained in:
@@ -45,7 +45,7 @@ export default ComboBoxComponent.extend({
|
||||
return Category.findUncategorized();
|
||||
} else {
|
||||
const generalCategoryId = this.siteSettings.general_category_id;
|
||||
if (!generalCategoryId) {
|
||||
if (!generalCategoryId || generalCategoryId < 0) {
|
||||
return this.defaultItem(null, htmlSafe(I18n.t("category.choose")));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user