diff --git a/src/widgets/portainer/component.jsx b/src/widgets/portainer/component.jsx
index d141bc306..c0c212cfd 100644
--- a/src/widgets/portainer/component.jsx
+++ b/src/widgets/portainer/component.jsx
@@ -34,10 +34,10 @@ export default function Component({ service }) {
);
if (widget.kubernetes) {
+ const error = applicationsError ?? servicesError ?? namespacesError;
// count can be an error object
- const error = applicationsError ?? servicesError ?? namespacesError ?? applicationsCount;
- if (error) {
- return ;
+ if (error || typeof applicationsCount === "object") {
+ return ;
}
if (applicationsCount == undefined || servicesCount == undefined || namespacesCount == undefined) {