I think this was maybe introduced very recently, could have been a merge conflict gone wrong or what, I'm not sure, but Im trying to use this
showLocation({
address: 'some address here'
})
However it is throwing the following error:
ERROR [MapsException: `showLocation` should contain keys `latitude` and `longitude`.]
When digging into the source code and the checkOptions function, the first check is for lat/lon - I think there is a left over condition here? e.g. should if (!latitude || !longitude) { have been removed, which would allow the lat/lon/address check to kick in? Additionally should the if (address && typeof address !== 'string') { check come after the lat/lon/address check?
const checkOptions = ({ latitude, longitude, address, googleForceLatLon, googlePlaceId, title, app, prefixes, appTitles, appsWhiteList, }) => {
if (!latitude || !longitude) {
throw new MapsException('`showLocation` should contain keys `latitude` and `longitude`.');
}
if (address && typeof address !== 'string') {
throw new MapsException('Option `address` should be of type `string`.');
}
if (!latitude && !longitude && !address) {
throw new MapsException('`latitude` & `longitude` or `address` is required. Both cannot be undefined.');
}
I think this was maybe introduced very recently, could have been a merge conflict gone wrong or what, I'm not sure, but Im trying to use this
However it is throwing the following error:
When digging into the source code and the
checkOptions
function, the first check is for lat/lon - I think there is a left over condition here? e.g. shouldif (!latitude || !longitude) {
have been removed, which would allow the lat/lon/address check to kick in? Additionally should theif (address && typeof address !== 'string') {
check come after the lat/lon/address check?Thanks!