Explorar o código

gracefully fail on image list render

jusrhee %!s(int64=5) %!d(string=hai) anos
pai
achega
75e433cbc1
Modificáronse 1 ficheiros con 8 adicións e 8 borrados
  1. 8 8
      dashboard/src/components/image-selector/ImageSelector.tsx

+ 8 - 8
dashboard/src/components/image-selector/ImageSelector.tsx

@@ -64,14 +64,14 @@ export default class ImageSelector extends Component<PropsType, StateType> {
                   }
                   }
                 })
                 })
                 images.push(...newImg)
                 images.push(...newImg)
-                if (i == registries.length - 1) {
-                  this.setState({
-                    images,
-                    registryId: registry.id,
-                    loading: false,
-                    error: false,
-                  });
-                }
+
+                // Gracefully fail if one of the integration connections is invalid
+                this.setState({
+                  images,
+                  registryId: registry.id,
+                  loading: false,
+                  error: false,
+                });
                 nextController()
                 nextController()
               }
               }
             });    
             });