diff --git a/src/common/k8s-api/kube-watch-api.ts b/src/common/k8s-api/kube-watch-api.ts index 7d0df2914f..116e8777be 100644 --- a/src/common/k8s-api/kube-watch-api.ts +++ b/src/common/k8s-api/kube-watch-api.ts @@ -60,7 +60,7 @@ interface KubeWatchPreloadOptions { export interface KubeWatchSubscribeStoreOptions extends KubeWatchPreloadOptions { /** - * Whether to subsribe only after loading all stores + * Whether to subscribe only after loading all stores * @default true */ waitUntilLoaded?: boolean; diff --git a/src/renderer/components/kube-object-list-layout/kube-object-list-layout.tsx b/src/renderer/components/kube-object-list-layout/kube-object-list-layout.tsx index d6021f776d..9daf2f797f 100644 --- a/src/renderer/components/kube-object-list-layout/kube-object-list-layout.tsx +++ b/src/renderer/components/kube-object-list-layout/kube-object-list-layout.tsx @@ -66,7 +66,7 @@ export class KubeObjectListLayout extends React.Component< const { store, dependentStores = [], subscribeStores } = this.props; const stores = Array.from(new Set([store, ...dependentStores])); const reactions: Disposer[] = [ - reaction(() => clusterContext.contextNamespaces, () => { + reaction(() => clusterContext.contextNamespaces.length, () => { // clear load errors this.loadErrors.length = 0; }), @@ -77,6 +77,7 @@ export class KubeObjectListLayout extends React.Component< kubeWatchApi.subscribeStores(stores, { preload: true, namespaces: clusterContext.contextNamespaces, + onLoadFailure: error => this.loadErrors.push(error), }), ); }