Logic fix for UI elements (#7657)

- Check for false, as !true includes undefined
- Prevents visual flashes due to short term rendering of elements
This commit is contained in:
Oliver 2024-07-16 09:16:50 +10:00 committed by GitHub
parent 25c91323c9
commit 12dfaaba9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ export function ServerInfoModal({
</OnlyStaff>
</Table.Td>
</Table.Tr>
{server.worker_running != true && (
{server?.worker_running == false && (
<Table.Tr>
<Table.Td>
<Trans>Background Worker</Trans>
@ -103,7 +103,7 @@ export function ServerInfoModal({
</Table.Td>
</Table.Tr>
)}
{server.email_configured != true && (
{server?.email_configured == false && (
<Table.Tr>
<Table.Td>
<Trans>Email Settings</Trans>

View File

@ -49,7 +49,7 @@ export default function TaskManagementPanel() {
return (
<>
{!taskInfo.is_running && (
{taskInfo?.is_running == false && (
<Alert title={t`Background Worker Not Running`} color="red">
<Text>{t`The background task manager service is not running. Contact your system administrator.`}</Text>
</Alert>