mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(site): handle null warnings in health page (#10775)
This commit is contained in:
@@ -103,7 +103,9 @@ export function HealthPageView({
|
||||
{healthStatus.healthy
|
||||
? Object.keys(sections).some(
|
||||
(key) =>
|
||||
healthStatus[key as keyof typeof sections]?.warnings
|
||||
healthStatus[key as keyof typeof sections].warnings !==
|
||||
null &&
|
||||
healthStatus[key as keyof typeof sections].warnings
|
||||
.length > 0,
|
||||
)
|
||||
? "All systems operational, but performance might be degraded"
|
||||
@@ -163,7 +165,7 @@ export function HealthPageView({
|
||||
const healthSection =
|
||||
healthStatus[key as keyof typeof sections];
|
||||
const isHealthy = healthSection.healthy;
|
||||
const isWarning = healthSection.warnings.length > 0;
|
||||
const isWarning = healthSection.warnings?.length > 0;
|
||||
return (
|
||||
<Box
|
||||
component="button"
|
||||
|
||||
Reference in New Issue
Block a user