Skip to content

Commit

Permalink
fix: Fix setting 'status' undefined error (#1605)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpro7 authored May 23, 2024
1 parent 823531c commit f8fa04a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/dsp-app/src/app/main/status/status.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<img class="error-image" [src]="'/assets/images/' + message?.image" alt="error image" />
</div>
<div class="text status-message">
<h2 class="mat-headline-6">{{ message.type | uppercase }} {{ status }} | {{ message?.message }}</h2>
<p [innerHTML]="message.description"></p>
<h2 class="mat-headline-6">{{ message?.type | uppercase }} {{ status }} | {{ message?.message }}</h2>
<p [innerHTML]="message?.description"></p>
<p *ngIf="comment">
<span *ngIf="message.type === 'error'"> <strong>Response in detail:</strong><br />&rarr; </span>
<span *ngIf="message?.type === 'error'"> <strong>Response in detail:</strong><br />&rarr; </span>
<span [innerHTML]="comment | appLinkify"></span>
</p>
<div [ngSwitch]="message?.action" class="action">
Expand Down
2 changes: 1 addition & 1 deletion apps/dsp-app/src/app/main/status/status.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class StatusComponent implements OnInit {
if (!this.status) {
// but status is defined in app.routing
this._route.data.subscribe(data => {
this.status = data.status;
this.status = data.status ?? 0;
this.comment = data.comment;
this.url = data.url;
});
Expand Down

0 comments on commit f8fa04a

Please sign in to comment.