From 14b30d84a1bb7a80a217989ba487ab9804704874 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Wed, 12 Jan 2022 07:05:27 -0500 Subject: [PATCH] Fix crash for KubeObjectStore.loadAll() (#4675) Signed-off-by: Sebastian Malton --- src/common/k8s-api/kube-object.store.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/k8s-api/kube-object.store.ts b/src/common/k8s-api/kube-object.store.ts index 1eb7d9ff50..8f82b9e92a 100644 --- a/src/common/k8s-api/kube-object.store.ts +++ b/src/common/k8s-api/kube-object.store.ts @@ -238,8 +238,9 @@ export abstract class KubeObjectStore extends ItemStore } @action - async loadAll({ namespaces = this.context.contextNamespaces, merge = true, reqInit, onLoadFailure }: KubeObjectStoreLoadAllParams = {}): Promise { + async loadAll({ namespaces, merge = true, reqInit, onLoadFailure }: KubeObjectStoreLoadAllParams = {}): Promise { await this.contextReady; + namespaces ??= this.context.contextNamespaces; this.isLoading = true; try {