mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-14 00:26:21 +00:00
Improve 404 navigation and styling
This commit is contained in:
@@ -53,6 +53,6 @@ describe('DocumentAsnComponent', () => {
|
||||
.mockReturnValue(of(convertToParamMap({ id: '5578' })))
|
||||
const navigateSpy = jest.spyOn(router, 'navigate')
|
||||
component.ngOnInit()
|
||||
expect(navigateSpy).toHaveBeenCalledWith(['404'])
|
||||
expect(navigateSpy).toHaveBeenCalledWith(['404'], { replaceUrl: true })
|
||||
})
|
||||
})
|
||||
|
@@ -25,7 +25,9 @@ export class DocumentAsnComponent implements OnInit {
|
||||
if (documentId.length == 1) {
|
||||
this.router.navigate(['documents', documentId[0]])
|
||||
} else {
|
||||
this.router.navigate(['404'])
|
||||
this.router.navigate(['404'], {
|
||||
replaceUrl: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user