Prechádzať zdrojové kódy

make portainer error detection more specific

shamoon 2 rokov pred
rodič
commit
0101e8ccb9
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      src/widgets/portainer/component.jsx

+ 2 - 2
src/widgets/portainer/component.jsx

@@ -23,8 +23,8 @@ export default function Component({ service }) {
     );
   }
 
-  if (containersData.error || !Array.isArray(containersData)) {
-    // containersData can be itself an error object
+  if (containersData.error || containersData.message) {
+    // containersData can be itself an error object e.g. if environment fails
     return <Container service={service} error={ containersData?.error ?? containersData } />;
   }