Просмотр исходного кода

add casing for when form doesn't exist

Alexander Belanger 4 лет назад
Родитель
Сommit
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 = {};
     let scopedVars = {};
 
 
-    if (data.isClusterScoped) {
+    if (data?.isClusterScoped) {
       scopedVars = {
       scopedVars = {
         "currentCluster.service.is_gcp":
         "currentCluster.service.is_gcp":
           context.currentCluster?.service == "gke",
           context.currentCluster?.service == "gke",