From 8ec90d88faaf3ab57a6e7a0cdf46a376d6bed54b Mon Sep 17 00:00:00 2001
From: Corey Hulen <corey@hulen.com>
Date: Thu, 11 May 2017 05:10:47 -0700
Subject: PLT-6561 Fixing javascript issue on compliance report (#6387)

---
 webapp/components/audit_table.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'webapp/components/audit_table.jsx')

diff --git a/webapp/components/audit_table.jsx b/webapp/components/audit_table.jsx
index 5d4bc4580..e07d6ca12 100644
--- a/webapp/components/audit_table.jsx
+++ b/webapp/components/audit_table.jsx
@@ -378,7 +378,10 @@ export function formatAuditInfo(audit, formatMessage) {
 
                 if (userIdField.indexOf('user_id') >= 0) {
                     userId = userIdField[userIdField.indexOf('user_id') + 1];
-                    username = UserStore.getProfile(userId).username;
+                    var profile = UserStore.getProfile(userId);
+                    if (profile) {
+                        username = profile.username;
+                    }
                 }
             }
 
-- 
cgit v1.2.3-1-g7c22

