volga-volga / react-native-yamap

React Native Yandex Maps | Яндекс Карты | Yandex.MapKit implementation for react native | YandexMaps
144 stars 80 forks source link

Cannot read property 'suggest' of null #245

Open Nodirbek3d opened 1 year ago

Nodirbek3d commented 1 year ago

In my case, GeoCoder works, but Suggest does not. Here is my code:

import {Geocoder, Suggest} from 'react-native-yamap';

Geocoder.init('xxx-xxx-xxx-xxx-xxx');

....
    const response_ = await Geocoder.reverseGeocode(q) ; // This one works
   const suggestions_ = await Suggest.suggestWithCoords(q); // this one throws errors:

The error is straight forward:

[TypeError: Cannot read property 'suggest' of null]

"react-native-yamap": "^4.1.18",