From f41198fbb6f4e72e331bb4e3d326534f90000ce9 Mon Sep 17 00:00:00 2001
From: kumavis <aaron@kumavis.me>
Date: Wed, 23 May 2018 22:33:02 -0700
Subject: sentry - setupRaven - ensure message is truthy

---
 app/scripts/lib/setupRaven.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'app')

diff --git a/app/scripts/lib/setupRaven.js b/app/scripts/lib/setupRaven.js
index d164827ab..30d0a3680 100644
--- a/app/scripts/lib/setupRaven.js
+++ b/app/scripts/lib/setupRaven.js
@@ -66,11 +66,11 @@ function simplifyErrorMessages(report) {
 
 function rewriteErrorMessages(report, rewriteFn) {
   // rewrite top level message
-  report.message = rewriteFn(report.message)
+  if (typeof report.message === 'string') report.message = rewriteFn(report.message)
   // rewrite each exception message
   if (report.exception && report.exception.values) {
     report.exception.values.forEach(item => {
-      item.value = rewriteFn(item.value)
+      if (typeof item.value === 'string') item.value = rewriteFn(item.value)
     })
   }
 }
-- 
cgit v1.2.3