Cannot read property 'getLayer' of undefined
acomito opened this issue · 4 comments
modules.js:159259 Uncaught TypeError: Cannot read property 'getLayer' of undefined
<GooglePlaceAutocomplete
onNewRequest={(selectedData, searchedText, selectedDataIndex) => console.log(selectedData)}
name={'location'}
floatingLabelText='location'
style={styles.fieldStyle}
/>
Also getting the following two:
modules.js:159235 Warning: It looks like you're using a minified copy of the development build of React. When deploying React apps to production, make sure to use the production build which skips development warnings and is faster. See https://fb.me/react-minification for more details.
and
Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's
rendermethod, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).
The react problem is because material-ui have ReactJS as production dependency, so there is two react in the scope, I will search if I can remove material-ui from the final dist file because it is required to have it in your app anyway.
I will look at this tomorrow :) thanks for the report !