Hi ,
I am using google places services Api and it was working in version 3.53 and it stopped working after that so I debugged and found that error is TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.
Code :-
const containerRef = React.useRef();
React.useEffect(() => {
try
{
const autocompleteService = new google.maps.places.AutocompleteService();
const placesService = new google.maps.places.PlacesService(
new google.maps.Map(containerRef.current)
);
}
catch (err) {
}
}, []);
The line new google.maps.Map(containerRef.current) is giving this error
I have tried to assign the values to different variables like
const containerRef = React.useRef();
React.useEffect(() => {
try
{ const autocompleteService = new google.maps.places.AutocompleteService();
const map = new google.maps.Map(containerRef.current);
const placesService = new google.maps.places.PlacesService(
map
);
} catch (err) {
}
}, []);
Please let me know if anybody can help?