Преглед изворни кода

add casing for when form doesn't exist

Alexander Belanger пре 4 година
родитељ
комит
58bce4eec4
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      dashboard/src/components/porter-form/PorterFormContextProvider.tsx

+ 1 - 1
dashboard/src/components/porter-form/PorterFormContextProvider.tsx

@@ -143,7 +143,7 @@ export const PorterFormContextProvider: React.FC<Props> = (props) => {
 
     let scopedVars = {};
 
-    if (data.isClusterScoped) {
+    if (data?.isClusterScoped) {
       scopedVars = {
         "currentCluster.service.is_gcp":
           context.currentCluster?.service == "gke",