瀏覽代碼

Legacy stacks hotfix (#3266)

* Fix

* HotFix
sdess09 2 年之前
父節點
當前提交
e4c0a485cc
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      dashboard/src/components/porter-form/field-components/KeyValueArray.tsx

+ 7 - 3
dashboard/src/components/porter-form/field-components/KeyValueArray.tsx

@@ -80,9 +80,13 @@ const KeyValueArray: React.FC<Props> = (props) => {
           .filter(Boolean);
 
         setState(() => ({
-          synced_env_groups: Array.isArray(populatedEnvGroups)
-            ? populatedEnvGroups
-            : [],
+          synced_env_groups: currentProject?.stacks_enabled ?
+            (Array.isArray(populatedEnvGroups)
+              ? populatedEnvGroups
+              : []) :
+            (Array.isArray(populatedEnvGroups)
+              ? populatedEnvGroups
+              : [])
         }));
         return;
       }