From 71788125dc517a0f64f76dbc0dfc807dafd9ce95 Mon Sep 17 00:00:00 2001 From: Michel dos Santos Kuguio Date: Fri, 17 May 2019 10:03:03 -0300 Subject: [PATCH] Fix Problem wifth camelcase _ i have a problen listen onZoomChanged, i saw this function cant camelize when i have _ is only " ", i fix to solve the problem. [#345](https://github.com/fullstackreact/google-maps-react/issues/345) --- src/lib/String.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/String.js b/src/lib/String.js index 9e86a238..c1194cae 100644 --- a/src/lib/String.js +++ b/src/lib/String.js @@ -1,5 +1,5 @@ export const camelize = function(str) { - return str.split(' ').map(function(word) { + return str.replace('_',' ').split(' ').map(function(word) { return word.charAt(0).toUpperCase() + word.slice(1); }).join(''); }