From 4b71e0227410156a620309107c2526ee468425f5 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 Signed-off-by: Jim Ehrismann --- 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 1832cdfa10..f2e3c22980 100644 --- a/src/common/k8s-api/kube-object.store.ts +++ b/src/common/k8s-api/kube-object.store.ts @@ -235,8 +235,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 {