Open Jiia opened 1 year ago
@Jiia Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
google-maps
tagThis is an automated message, feel free to ignore.
This seems to be the reason:
Treating undefined
and null
like an empty string should be a good solution here.
PlacesAutocomplete call crashes if the optional
params.location
field is present but undefined.Environment details
OS: macOS Ventura 13.4 Library version: 3.3.41
Steps to reproduce
Call
placesAutocomplete
with{ params: { ...rest, location: undefined } }
Code example
Stack trace
If the location is completely unspecified, the function call works fine. This can be solved by defining
location
like: