Open ValeryVS opened 4 years ago
Found it. It was not GeoObject's but Polyline's fault. Which is extended from BaseGeoObject too. https://codesandbox.io/s/naughty-elion-m7nfh
For now I'm fixed this with {waypoints && <Polyline...
.
But this, probably, should be fixed or TypeScript type should be corrected. Now geometry is optional.
export interface GeoObjectProps<G, P = AnyObject, O = AnyObject>
extends AnyObject {
geometry?: G;
...
Can you help to fix this issue gribnoysup i had also this kind of issue when filtering geobjects?
I think this is not related to typescript. I made some investigation on it. So if you pass null or undefined as geometry: https://github.com/gribnoysup/react-yandex-maps/blob/04db88dfe52cfb2d3a07467a6501b407f1ef2ef3/src/geo-objects/BaseGeoObject.js#L48
Yandex Maps will create object without geometry prop and will break updating logic. As workaround you can pass empty array as initial state.
Error text
I use
GeoObject
Error goes from
BaseGeoObject
'supdateObject
function. https://github.com/gribnoysup/react-yandex-maps/blob/04db88dfe52cfb2d3a07467a6501b407f1ef2ef3/src/geo-objects/BaseGeoObject.js#L81-L100Shoul I preload some module or something? Or it was just some random glitch?