Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: Dont include frame component in component router service

shamoonbefb80bddfcc
diff --git a/src-ui/src/app/services/component-router.service.ts b/src-ui/src/app/services/component-router.service.ts
index 3f97584b7..0589ef61f 100644
--- a/src-ui/src/app/services/component-router.service.ts
+++ b/src-ui/src/app/services/component-router.service.ts
@@ -2,6 +2,8 @@ import { Injectable } from '@angular/core'
import { ActivationStart, Event, Router } from '@angular/router'
import { filter } from 'rxjs'
+const EXCLUDE_COMPONENTS = ['AppFrameComponent']
+
@Injectable({
providedIn: 'root',
})
@@ -15,7 +17,8 @@ export class ComponentRouterService {
.subscribe((event: ActivationStart) => {
if (
this.componentHistory[this.componentHistory.length - 1] !==
- event.snapshot.component.name
+ event.snapshot.component.name &&
+ !EXCLUDE_COMPONENTS.includes(event.snapshot.component.name)
) {
this.history.push(event.snapshot.url.toString())
this.componentHistory.push(event.snapshot.component.name)