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 = {