1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix: When disconnecting non active cluster from left menu, the active cluster gets disconnected

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-08-03 16:51:24 +03:00
parent e9f60a7907
commit 1d9d4dbad4

View File

@ -56,8 +56,10 @@ export class ClustersMenu extends React.Component<Props> {
menu.append(new MenuItem({ menu.append(new MenuItem({
label: _i18n._(t`Disconnect`), label: _i18n._(t`Disconnect`),
click: async () => { click: async () => {
navigate(clusterStatusURL()); await clusterIpc.disconnect.invokeFromRenderer(cluster.id);
await clusterIpc.disconnect.invokeFromRenderer(); if (cluster.id === clusterStore.activeClusterId) {
navigate(clusterStatusURL());
}
} }
})) }))
} }