From fa2efb1ac978dfbfa38aa475c898890eca54f7e8 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sun, 27 Jul 2025 20:07:37 -0700
Subject: [PATCH] Fix: fix error handling in Portainer Kubernetes widget
(#5584)
---
src/widgets/portainer/component.jsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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) {