Fix isLoadingAll within KubeObjectStore.loadItems (#2174)

* fix isLoadingAll within KubeObjectStore.loadItems

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix isLoadingAll within KubeObjectStore.loadItems

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2021-02-17 22:28:33 +02:00
1 parent b8c78cd18f
commit 174bba98d7
1 file changed
+4 -2
+4 -2
View File
@@ -109,9 +109,11 @@ export abstract class KubeObjectStore<T extends KubeObject = any> 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);