mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Regression in Popup:normalizeOffset()

Open musterknabe opened this issue 9 months ago • 1 comments

While migrating from Mapbox v1 to v3 I stumbled over this regression that throws a reference error in the following line:

https://github.com/mapbox/mapbox-gl-js/blob/87938fb284bf9f2c4b1bbbc7baaad074438ae014/src/ui/popup.ts#L723

The regression was introduced in https://github.com/mapbox/mapbox-gl-js/commit/69a888cf303c6b683a7c920eac64e6d4862b9871 by removing this line and setting the default directly in the function parameter:

if (!offset) offset = (new Point(0, 0));

When calling the function with offset = null it throws, where it used to gracefully return the default offset.

musterknabe avatar Apr 17 '25 14:04 musterknabe

Thanks for reporting

ibesora avatar May 20 '25 15:05 ibesora