mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
Fix: fix improved close behavior with production minified javascript
This commit is contained in:
@@ -29,7 +29,7 @@ describe('ComponentRouterService', () => {
|
||||
eventsSubject.next(
|
||||
new ActivationStart({
|
||||
url: 'test-url',
|
||||
component: { name: 'TestComponent' },
|
||||
data: { componentName: 'TestComponent' },
|
||||
} as any)
|
||||
)
|
||||
|
||||
@@ -41,13 +41,13 @@ describe('ComponentRouterService', () => {
|
||||
eventsSubject.next(
|
||||
new ActivationStart({
|
||||
url: 'test-url-1',
|
||||
component: { name: 'TestComponent' },
|
||||
data: { componentName: 'TestComponent' },
|
||||
} as any)
|
||||
)
|
||||
eventsSubject.next(
|
||||
new ActivationStart({
|
||||
url: 'test-url-2',
|
||||
component: { name: 'TestComponent' },
|
||||
data: { componentName: 'TestComponent' },
|
||||
} as any)
|
||||
)
|
||||
|
||||
@@ -59,13 +59,13 @@ describe('ComponentRouterService', () => {
|
||||
eventsSubject.next(
|
||||
new ActivationStart({
|
||||
url: 'test-url-1',
|
||||
component: { name: 'TestComponent1' },
|
||||
data: { componentName: 'TestComponent1' },
|
||||
} as any)
|
||||
)
|
||||
eventsSubject.next(
|
||||
new ActivationStart({
|
||||
url: 'test-url-2',
|
||||
component: { name: 'TestComponent2' },
|
||||
data: { componentName: 'TestComponent2' },
|
||||
} as any)
|
||||
)
|
||||
|
||||
@@ -76,13 +76,13 @@ describe('ComponentRouterService', () => {
|
||||
eventsSubject.next(
|
||||
new ActivationStart({
|
||||
url: 'test-url-1',
|
||||
component: { name: 'TestComponent' },
|
||||
data: { componentName: 'TestComponent' },
|
||||
} as any)
|
||||
)
|
||||
eventsSubject.next(
|
||||
new ActivationStart({
|
||||
url: 'test-url-2',
|
||||
component: { name: 'TestComponent' },
|
||||
data: { componentName: 'TestComponent' },
|
||||
} as any)
|
||||
)
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('ComponentRouterService', () => {
|
||||
eventsSubject.next(
|
||||
new ActivationStart({
|
||||
url: 'test-url',
|
||||
component: { name: 'TestComponent' },
|
||||
data: { componentName: 'TestComponent' },
|
||||
} as any)
|
||||
)
|
||||
|
||||
|
@@ -17,11 +17,11 @@ export class ComponentRouterService {
|
||||
.subscribe((event: ActivationStart) => {
|
||||
if (
|
||||
this.componentHistory[this.componentHistory.length - 1] !==
|
||||
event.snapshot.component.name &&
|
||||
!EXCLUDE_COMPONENTS.includes(event.snapshot.component.name)
|
||||
event.snapshot.data.componentName &&
|
||||
!EXCLUDE_COMPONENTS.includes(event.snapshot.data.componentName)
|
||||
) {
|
||||
this.history.push(event.snapshot.url.toString())
|
||||
this.componentHistory.push(event.snapshot.component.name)
|
||||
this.componentHistory.push(event.snapshot.data.componentName)
|
||||
} else {
|
||||
// Update the URL of the current component in case the same component was loaded via a different URL
|
||||
this.history[this.history.length - 1] = event.snapshot.url.toString()
|
||||
|
Reference in New Issue
Block a user