From b032ac462c7618e81d711000686daae650f166ef Mon Sep 17 00:00:00 2001 From: IanM Date: Tue, 8 Oct 2024 14:50:14 +0100 Subject: [PATCH] fix: basicspage broken when no displayname drivers enabled --- .../js/src/admin/components/BasicsPage.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/framework/core/js/src/admin/components/BasicsPage.tsx b/framework/core/js/src/admin/components/BasicsPage.tsx index 3381c70ac6..782afc0469 100644 --- a/framework/core/js/src/admin/components/BasicsPage.tsx +++ b/framework/core/js/src/admin/components/BasicsPage.tsx @@ -89,9 +89,9 @@ export default class BasicsPage ext 90 ); - items.add( - 'default-locale', - Object.keys(this.localeOptions).length > 1 && ( + Object.keys(this.localeOptions).length > 1 && + items.add( + 'default-locale', <> {this.buildSettingComponent({ type: 'select', @@ -104,10 +104,9 @@ export default class BasicsPage ext setting: 'show_language_selector', label: app.translator.trans('core.admin.basics.show_language_selector_label'), })} - - ), - 80 - ); + , + 80 + ); items.add( 'home-page', @@ -136,9 +135,10 @@ export default class BasicsPage ext 60 ); - items.add( - 'display-name-driver', - Object.keys(this.displayNameOptions).length > 1 && + Object.keys(this.displayNameOptions).length > 1 && + items.add( + 'display-name-driver', + this.buildSettingComponent({ type: 'select', setting: 'display_name_driver', @@ -146,8 +146,8 @@ export default class BasicsPage ext label: app.translator.trans('core.admin.basics.display_name_heading'), help: app.translator.trans('core.admin.basics.display_name_text'), }), - 50 - ); + 50 + ); items.add( 'slug-driver',