diff --git a/src/renderer/kube-object.store.ts b/src/renderer/kube-object.store.ts index 023048cb73..987112a25c 100644 --- a/src/renderer/kube-object.store.ts +++ b/src/renderer/kube-object.store.ts @@ -109,9 +109,11 @@ export abstract class KubeObjectStore extends ItemSt return api.list({}, this.query); } - const isLoadingAll = this.context.allNamespaces.every(ns => namespaces.includes(ns)); + const isLoadingAll = this.context.allNamespaces?.length > 1 + && this.context.cluster.accessibleNamespaces.length === 0 + && this.context.allNamespaces.every(ns => namespaces.includes(ns)); - if (isLoadingAll && this.context.cluster.accessibleNamespaces.length === 0) { + if (isLoadingAll) { this.loadedNamespaces = []; return api.list({}, this.query);