0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

🐛 Fixed About modal dev experiments info in Settings (#19087)

refs https://ghost.slack.com/archives/C0568LN2CGJ/p1700617587979039

- Fixes an issue where dev experiments data shows up in the settings
About modal while it's disabled. Now it will only shows that info when it's
enabled.
This commit is contained in:
Ronald Langeveld 2023-11-22 08:28:31 +02:00 committed by GitHub
parent e01c87800e
commit 8038c5854e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,11 +17,12 @@ const AboutModal = NiceModal.create<RoutingModalProps>(({}) => {
return date.getFullYear();
}
function hasDeveloperExperiments():string {
function hasDeveloperExperiments():boolean {
if (config.enableDeveloperExperiments) {
return 'Enabled';
return true;
} else {
return false;
}
return 'Disabled';
}
function showSystemInfo() : boolean {
@ -73,7 +74,7 @@ const AboutModal = NiceModal.create<RoutingModalProps>(({}) => {
}
{
hasDeveloperExperiments() && (
<div><strong>Developer experiments:</strong> {hasDeveloperExperiments()}</div>
<div><strong>Developer experiments:</strong> Enabled</div>
)
}