diff --git a/examples/gh-pages/scripts/components/events/SimpleClickEvent.js b/examples/gh-pages/scripts/components/events/SimpleClickEvent.js index 047f193e..65d3d08d 100644 --- a/examples/gh-pages/scripts/components/events/SimpleClickEvent.js +++ b/examples/gh-pages/scripts/components/events/SimpleClickEvent.js @@ -24,6 +24,10 @@ class SimpleClickEvent extends React.Component { _handle_map_center_changed () { const {center, timeoutId} = this.state; + const {marker} = this.refs; + if (!marker) { + return; + } const newPos = this.refs.marker.getPosition(); if (center.equals(newPos)) { // Notice: Check newPos equality here, diff --git a/src/internals/VirtualContainer.js b/src/internals/VirtualContainer.js index e898cf48..5af1b630 100644 --- a/src/internals/VirtualContainer.js +++ b/src/internals/VirtualContainer.js @@ -19,7 +19,6 @@ class VirtualContainer extends React.Component { const extraProps = { googleMapsApi: props.googleMapsApi, map: props.map, - ref: null, }; return React.Children.map(props.children, (child) => {