[DSC-287] Fixed for yarn start error 500 loading

This commit is contained in:
Rezart Vata
2021-12-01 18:50:42 +01:00
parent 04548237fd
commit c8de6ccb4c
2 changed files with 5 additions and 20 deletions

View File

@@ -1,6 +1,5 @@
import { ServerResponseService } from '../core/services/server-response.service'; import { ServerResponseService } from '../core/services/server-response.service';
import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core'; import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { AuthService } from '../core/auth/auth.service';
/** /**
* This component representing the `PageNotFound` DSpace page. * This component representing the `PageNotFound` DSpace page.
@@ -11,23 +10,5 @@ import { AuthService } from '../core/auth/auth.service';
templateUrl: './page-internal-server-error.component.html', templateUrl: './page-internal-server-error.component.html',
changeDetection: ChangeDetectionStrategy.Default changeDetection: ChangeDetectionStrategy.Default
}) })
export class PageInternalServerErrorComponent implements OnInit { export class PageInternalServerErrorComponent {
/**
* Initialize instance variables
*
* @param {AuthService} authservice
* @param {ServerResponseService} responseService
*/
constructor(private authservice: AuthService, private responseService: ServerResponseService) {
this.responseService.setNotFound();
}
/**
* Remove redirect url from the state
*/
ngOnInit(): void {
this.authservice.clearRedirectUrl();
}
} }

View File

@@ -71,5 +71,9 @@ export class RootComponent implements OnInit {
.pipe( .pipe(
map(([collapsed, mobile]) => collapsed || mobile) map(([collapsed, mobile]) => collapsed || mobile)
); );
if (this.router.url === '/500') {
this.shouldShowRouteLoader = false;
}
} }
} }