bug: map.flyTo with explicit `duration: undefined` throws `TypeError`, subsequent calls to `map.getBounds()` throw many `Error: Invalid LatLng Object`
bug :lady_beetle:
### mapbox-gl-js version
v3.21.0
### Browser and version
tested in Chromium Version 145.0.7632.159 (Official Build) (64-bit), and Firefox 140.0 (64-bit)
### Expected behavior
Calling `flyTo` with explicit `duration: undefined` should behave the same as omitting `duration` parameter.
### Actual behavior
Calling `flyTo` with explicit `duration: undefined` causes total breakdown.
### Link to the demonstration
https://output.jsbin.com/yopanudexe
### Steps to trigger the unexpected behavior
this suffices:
```
map.flyTo({ center: [10, 10], zoom: 3, duration: undefined });
map.getBounds();
```
### Relevant log output
```shell
Uncaught TypeError: can't access property 3 of null
j vec3.js:500
fromInvProjectionMatrix primitives.ts:135
_calcMatrices transform.ts:2473
set zoom transform.ts:540
z camera.ts:1729
_renderFrameCallback camera.ts:1837
run task_queue.ts:51
_render map.ts:4510
_frame map.ts:5003
frame browser.ts:39
_triggerFrame map.ts:4997
triggerRepaint map.ts:4991
_update map.ts:4439
_requestRenderFrame map.ts:4451
_ease camera.ts:1829
flyTo camera.ts:1767
<anonymous> repro.html:29
fire evented.ts:151
_render map.ts:4598
_frame map.ts:5003
frame browser.ts:39
_triggerFrame map.ts:4997
triggerRepaint map.ts:4991
_render map.ts:4679
_frame map.ts:5003
frame browser.ts:39
_triggerFrame map.ts:4997
triggerRepaint map.ts:4991
_render map.ts:4679
_frame map.ts:5003
frame browser.ts:39
_triggerFrame map.ts:4997
triggerRepaint map.ts:4991
_render map.ts:4679
_frame map.ts:5003
frame browser.ts:39
_triggerFrame map.ts:4997
_render map.ts:4691
_frame map.ts:5003
frame browser.ts:39
_triggerFrame map.ts:4997
triggerRepaint map.ts:4991
_render map.ts:4679
_frame map.ts:5003
frame browser.ts:39
_triggerFrame map.ts:4997
triggerRepaint map.ts:4991
_render map.ts:4679
_frame map.ts:5003
frame browser.ts:39
_triggerFrame map.ts:4997
triggerRepaint map.ts:4991
_update map.ts:4439
Map map.ts:795
fire evented.ts:151
fire evented.ts:168
fire evented.ts:168
_tileLoaded source_cache.ts:319
c vector_tile_source.ts:411
processTask actor.ts:165
receive actor.ts:144
mapbox-gl.js:11:6883
Uncaught Error: Invalid LngLat object: (NaN, NaN)
Ru lng_lat.ts:76
unproject mercator.ts:31
coordinateLocation transform.ts:1721
pointLocation3D transform.ts:1692
unproject map.ts:1575
Xa events.ts:152
mouseover map_event.ts:61
handleEvent handler_manager.ts:360
kl handler_manager.ts:192
Map map.ts:737
<anonymous> repro.html:25
lng_lat.ts:76:19
```
0 条评论