mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Register existing store with new apiBase when re-registering Kube API (#2157)
* Update store key after api's apiBase change Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Re-register existing store when registering API Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Revert kube-api changes Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
1e5d682b9b
commit
3f2d912816
@ -23,6 +23,12 @@ export class ApiManager {
|
|||||||
|
|
||||||
registerApi(apiBase: string, api: KubeApi) {
|
registerApi(apiBase: string, api: KubeApi) {
|
||||||
if (!this.apis.has(apiBase)) {
|
if (!this.apis.has(apiBase)) {
|
||||||
|
this.stores.forEach((store) => {
|
||||||
|
if(store.api === api) {
|
||||||
|
this.stores.set(apiBase, store);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.apis.set(apiBase, api);
|
this.apis.set(apiBase, api);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user