Check for accessibleNamespaces length

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2021-02-15 06:07:42 +03:00
1 parent ca518c7f55
commit fab7fc54b4
1 file changed
+2 -1
@@ -79,8 +79,9 @@ export class ReleaseStore extends ItemStore<HelmRelease> {
async loadItems(namespaces: string[]) {
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();
} else {
return Promise