1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Check for accessibleNamespaces length

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-02-15 06:07:42 +03:00
parent ca518c7f55
commit fab7fc54b4

View File

@ -79,8 +79,9 @@ export class ReleaseStore extends ItemStore<HelmRelease> {
async loadItems(namespaces: string[]) { async loadItems(namespaces: string[]) {
const isLoadingAll = namespaceStore.allowedNamespaces.every(ns => namespaces.includes(ns)); const isLoadingAll = namespaceStore.allowedNamespaces.every(ns => namespaces.includes(ns));
const noAccessibleNamespaces = namespaceStore.context.cluster.accessibleNamespaces.length === 0;
if (isLoadingAll) { if (isLoadingAll && noAccessibleNamespaces) {
return helmReleasesApi.list(); return helmReleasesApi.list();
} else { } else {
return Promise return Promise