web/satellite: remove redundant console errors on duplicated route changes

WHAT:
removed console errors when trying to navigate to current route

WHY:
there shouldn't be errors in console

Change-Id: Ifa6ccf2f336cab58ac5e27b5dae2167a3229f98a
This commit is contained in:
Vitalii Shpital 2021-05-24 18:36:54 +03:00
parent 0ff3516f54
commit b33b0a38d6
2 changed files with 12 additions and 3 deletions

View File

@ -119,7 +119,10 @@ export default class ProjectDropdown extends Vue {
* Route to projects list page.
*/
public onProjectsLinkClick(): void {
this.$router.push(RouteConfig.ProjectsList.path);
if (this.$route.name !== RouteConfig.ProjectsList.name) {
this.$router.push(RouteConfig.ProjectsList.path);
}
this.$emit('close');
}

View File

@ -61,7 +61,10 @@ export default class SettingsDropdown extends Vue {
* Redirects to account settings page.
*/
public onAccountSettingsClick(): void {
this.$router.push(RouteConfig.Account.with(RouteConfig.Settings).path);
if (this.$route.name !== RouteConfig.Settings.name) {
this.$router.push(RouteConfig.Account.with(RouteConfig.Settings).path);
}
this.closeDropdown();
}
@ -69,7 +72,10 @@ export default class SettingsDropdown extends Vue {
* Redirects to billing page.
*/
public onBillingClick(): void {
this.$router.push(RouteConfig.Account.with(RouteConfig.Billing).path);
if (this.$route.name !== RouteConfig.Billing.name) {
this.$router.push(RouteConfig.Account.with(RouteConfig.Billing).path);
}
this.closeDropdown();
}