Skip to content

Commit

Permalink
Fixed bug when getting AuditTrail messages
Browse files Browse the repository at this point in the history
  • Loading branch information
HaydenHodge committed Aug 27, 2018
1 parent 3de9b77 commit d4fd001
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/src/components/dashboard/auditTrail/auditTrail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,14 @@ export class AuditTrailComponent extends Vue {

private getPreview(message: string) {
let length = 140;
if (message.length > length) {
return message.substr(0, length) + '...';
if (message !== null && message !== undefined) {
if (message.length > length) {
return message.substr(0, length) + '...';
} else {
return message.substr(0, length);
}
} else {
return message.substr(0, length);
return 'Unable to retrieve AuditTrail Message';
}
}

Expand Down

0 comments on commit d4fd001

Please sign in to comment.