Skip to content

A platform for community discussion. Free, open, simple.

FIX: new category tab was showing double errors (#37331)

Krise20c637f5357
diff --git a/frontend/discourse/admin/controllers/edit-category/tabs.js b/frontend/discourse/admin/controllers/edit-category/tabs.js
index df6ca6754f4..fde2e78b4c4 100644
--- a/frontend/discourse/admin/controllers/edit-category/tabs.js
+++ b/frontend/discourse/admin/controllers/edit-category/tabs.js
@@ -159,6 +159,10 @@ export default class EditCategoryTabsController extends Controller {
@action
validateForm(data, { addError }) {
+ if (this.selectedTab === "general") {
+ return;
+ }
+
let hasGeneralTabErrors = false;
if (!data.name) {
@@ -177,7 +181,7 @@ export default class EditCategoryTabsController extends Controller {
hasGeneralTabErrors = true;
}
- if (hasGeneralTabErrors && this.selectedTab !== "general") {
+ if (hasGeneralTabErrors) {
this.selectedTab = "general";
}
}