Skip to content

Commit

Permalink
fix(pwa-utils): handle non-strings in startCase (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkcollier authored and pi0 committed Feb 23, 2019
1 parent ee47410 commit 782217a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pwa-utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 782217a

Please sign in to comment.