Merge pull request #11486 from davidiamaf/davidiamaf-pixel-null-guard

guard for null
This commit is contained in:
Andreas Hocevar
2020-08-28 10:22:02 +02:00
committed by GitHub

View File

@@ -458,6 +458,9 @@ class Overlay extends BaseObject {
.getView()
.getCenterInternal());
const centerPx = map.getPixelFromCoordinateInternal(center);
if (!centerPx) {
return;
}
const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];
const panOptions = panIntoViewOptions.animation || {};