diff --git a/client/packages/lowcoder/src/pages/setting/environments/EnvironmentsList.tsx b/client/packages/lowcoder/src/pages/setting/environments/EnvironmentsList.tsx index c6f739c51..7b041b81f 100644 --- a/client/packages/lowcoder/src/pages/setting/environments/EnvironmentsList.tsx +++ b/client/packages/lowcoder/src/pages/setting/environments/EnvironmentsList.tsx @@ -82,7 +82,7 @@ const EnvironmentsList: React.FC = () => { // Calculate environment type statistics const environmentStats = React.useMemo(() => { const stats = environments.reduce((acc, env) => { - const type = env.environmentType.toUpperCase(); + const type = env.environmentType?.toUpperCase() || 'TEST'; acc[type] = (acc[type] || 0) + 1; return acc; }, {} as Record); @@ -145,7 +145,7 @@ const EnvironmentsList: React.FC = () => { (env.environmentName || "").toLowerCase().includes(searchLower) || (env.environmentFrontendUrl || "").toLowerCase().includes(searchLower) || env.environmentId.toLowerCase().includes(searchLower) || - env.environmentType.toLowerCase().includes(searchLower) + (env.environmentType || "").toLowerCase().includes(searchLower) ); }).sort((a, b) => { // Sort by license status: licensed environments first diff --git a/client/packages/lowcoder/src/pages/setting/environments/components/EnvironmentsTable.tsx b/client/packages/lowcoder/src/pages/setting/environments/components/EnvironmentsTable.tsx index 0a1e9d98e..509cb509a 100644 --- a/client/packages/lowcoder/src/pages/setting/environments/components/EnvironmentsTable.tsx +++ b/client/packages/lowcoder/src/pages/setting/environments/components/EnvironmentsTable.tsx @@ -152,7 +152,7 @@ const EnvironmentsTable: React.FC = ({
{ - if (!envType) return 'UNKNOWN'; + if (!envType) return 'TEST'; return envType.toUpperCase(); }; \ No newline at end of file