From 7fcccfd3e0eb9e622747291065b5d3b7b99345dd Mon Sep 17 00:00:00 2001 From: alexkcollier Date: Fri, 22 Feb 2019 14:01:04 -0500 Subject: [PATCH] fix(pwa-utils): handle non-strings in `startCase` --- packages/pwa-utils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pwa-utils/index.js b/packages/pwa-utils/index.js index 4cb89a0b..9c51ef06 100755 --- a/packages/pwa-utils/index.js +++ b/packages/pwa-utils/index.js @@ -31,7 +31,7 @@ function getRouteParams (options) { } function startCase (str) { - return str[0].toUpperCase() + str.substr(1) + return typeof str === 'string' ? str[0].toUpperCase() + str.substr(1) : str } module.exports = {