1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

fix(environment): update page title when no environment selected. (#7606)

* fix(environment): update page title when no environment selected.

* fix(environment): update page title when clearing environment from side bar.

* fix(environment): update page title when clearing environment from a non-environment page.
This commit is contained in:
fhanportainer 2022-09-07 11:08:45 +12:00 committed by GitHub
parent 2b2580fb61
commit 77c3f9131b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 3 deletions

View file

@ -10,9 +10,7 @@ export function onStartupAngular($rootScope, $state, $interval, LocalStorage, En
$transitions.onEnter({}, () => {
const endpoint = EndpointProvider.currentEndpoint();
if (endpoint) {
document.title = `${defaultTitle} | ${endpoint.Name}`;
}
document.title = endpoint ? `${defaultTitle} | ${endpoint.Name}` : `${defaultTitle}`;
});
// Workaround to prevent the loading bar from going backward