From 82a2ee9a3479689b48226df1eb53c3d931d21066 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Fri, 10 Nov 2017 16:56:38 -0800 Subject: [PATCH] Add safe string method access for toTitleCase --- src/core/components/errors.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/components/errors.jsx b/src/core/components/errors.jsx index c72dd2fd..c3d6cf93 100644 --- a/src/core/components/errors.jsx +++ b/src/core/components/errors.jsx @@ -113,7 +113,7 @@ const SpecErrorItem = ( { error, jumpToLine } ) => { } function toTitleCase(str) { - return str + return (str || "") .split(" ") .map(substr => substr[0].toUpperCase() + substr.slice(1)) .join(" ")