Commit cc44538d authored by Mark Harding's avatar Mark Harding

(fix): if no entity then don't blow up

parent 73c20ec7
No related merge requests found
Pipeline #62864286 running with stages
......@@ -14,11 +14,16 @@
<p>{{report.appeal_note}}</p>
</div>
<minds-card *ngIf="report.entity"
class=""
[object]="report.entity"
hostClass="mdl-card m-border"
></minds-card>
<ng-container *ngIf="report.entity; else noEntity">
<minds-card *ngIf="report.entity"
class=""
[object]="report.entity"
hostClass="mdl-card m-border"
></minds-card>
</ng-container>
<ng-template #noEntity>
<p>The post could not be loaded. Please overturn the report</p>
</ng-template>
<div class="m-juryDutySessionContent__options">
<button
......
......@@ -26,7 +26,7 @@ export class JuryDutySessionContentComponent {
}
getAction(report) {
let friendlyString = report.entity.type == 'user' ? 'banned' : 'removed';
let friendlyString = report.entity && report.entity.type == 'user' ? 'banned' : 'removed';
switch (report.reason_code) {
case 2:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment