Skip to content

Commit 782217a

Browse files
alexkcollierpi0
authored andcommitted
fix(pwa-utils): handle non-strings in startCase (#150)
1 parent ee47410 commit 782217a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/pwa-utils/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function getRouteParams (options) {
3131
}
3232

3333
function startCase (str) {
34-
return str[0].toUpperCase() + str.substr(1)
34+
return typeof str === 'string' ? str[0].toUpperCase() + str.substr(1) : str
3535
}
3636

3737
module.exports = {

0 commit comments

Comments
 (0)