fix: add null safety and type guard for ErrorDialogComponent data

fix:logic

fix: Handles all data types gracefully

improve the typeScript Component
This commit is contained in:
shubhamsharma9199
2025-11-05 22:24:27 +05:30
parent e4d5966bd6
commit 925a1aca00
2 changed files with 30 additions and 6 deletions
@@ -1,8 +1,8 @@
<h1 mat-dialog-title>{{ 'Error Log' | translate }}</h1>
<div mat-dialog-content>
<p *ngIf="!showAsCode">{{ data }}</p>
<span *ngIf="showAsCode" [innerHTML]="data"></span>
<p *ngIf="!showAsCode">{{ displayData }}</p>
<span *ngIf="showAsCode" [innerHTML]="sanitizedData"></span>
</div>
<mat-dialog-actions align="left">