Feroze Mohideen 3 年之前
父節點
當前提交
bea2f21d54
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      dashboard/src/main/home/app-dashboard/expanded-app/ExpandedApp.tsx

+ 4 - 6
dashboard/src/main/home/app-dashboard/expanded-app/ExpandedApp.tsx

@@ -353,15 +353,13 @@ const ExpandedApp: React.FC<Props> = ({ ...props }) => {
     ) {
       const svcs = Service.deserialize(helmValues, defaultValues, porterJson);
       setServices(svcs);
-      if (helmValues && "global" in helmValues) {
-        delete helmValues.global; // not necessary for displaying services or env variables
-      }
-      if (Object.keys(helmValues).length > 0) {
-        const envs = Service.retrieveEnvFromHelmValues(helmValues);
+      const { global, ...helmValuesWithoutGlobal } = helmValues;
+      if (Object.keys(helmValuesWithoutGlobal).length > 0) {
+        const envs = Service.retrieveEnvFromHelmValues(helmValuesWithoutGlobal);
         setEnvVars(envs);
         const subdomain = Service.retrieveSubdomainFromHelmValues(
           svcs,
-          helmValues
+          helmValuesWithoutGlobal
         );
         setSubdomain(subdomain);
       }