瀏覽代碼

make portainer error detection more specific

shamoon 2 年之前
父節點
當前提交
0101e8ccb9
共有 1 個文件被更改,包括 2 次插入2 次删除
  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 } />;
     return <Container service={service} error={ containersData?.error ?? containersData } />;
   }
   }