Procházet zdrojové kódy

fix crash on error

Alexander Belanger před 4 roky
rodič
revize
7a013dc7d9
1 změnil soubory, kde provedl 5 přidání a 3 odebrání
  1. 5 3
      dashboard/src/components/ProvisionerStatus.tsx

+ 5 - 3
dashboard/src/components/ProvisionerStatus.tsx

@@ -107,9 +107,11 @@ const ProvisionerStatus: React.FC<Props> = ({ modules }) => {
       errors = errors.filter(
       errors = errors.filter(
         (error, index, self) =>
         (error, index, self) =>
           index ===
           index ===
-          self.findIndex(
-            (e) => e === error || e.includes(error) || error.includes(e)
-          )
+          self.findIndex((e) => {
+            if (e && error) {
+              return e === error || e.includes(error) || error.includes(e);
+            }
+          })
       );
       );
 
 
       const width =
       const width =