mirror of https://github.com/portainer/portainer
fix(session): reset the environment session storage after deleting it (#8119)
parent
563ead85cc
commit
1008afd1fe
|
@ -33,6 +33,13 @@ export function EndpointProvider() {
|
|||
if (endpoint && endpoint.Type === EnvironmentType.EdgeAgentOnDocker) {
|
||||
state.pingInterval = setInterval(() => ping(endpoint.Id), 60 * 1000);
|
||||
}
|
||||
|
||||
if (endpoint === null) {
|
||||
sessionStorage.setItem(
|
||||
'portainer.environmentId',
|
||||
JSON.stringify(undefined)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function currentEndpoint() {
|
||||
|
|
|
@ -46,8 +46,6 @@ export class EndpointsController {
|
|||
// If the current endpoint was deleted, then clean endpoint store
|
||||
if (endpoints.some((e) => e.Id === id)) {
|
||||
this.StateManager.cleanEndpoint();
|
||||
// trigger sidebar rerender
|
||||
this.applicationState.endpoint = {};
|
||||
}
|
||||
|
||||
this.$state.reload();
|
||||
|
|
Loading…
Reference in New Issue