Skip to content

Commit d2009fb

Browse files
committed
fix(error): use default error code of 404 if now error code was provided
1 parent 2fbd8f0 commit d2009fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/pages/error/error.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { animations } from './error.animations'
1616
export class ErrorComponent {
1717
public code$: Observable<StatusCodes> = this.route.queryParams.pipe(
1818
takeUntilDestroyed(),
19-
map<Params, StatusCodes>(params => parseInt(params?.code as string, 10)),
19+
map<Params, StatusCodes>(params => parseInt((params?.code ?? '404') as string, 10)),
2020
filter(code => !isNaN(code)),
2121
take(1),
2222
)

0 commit comments

Comments
 (0)