Merge pull request #11486 from davidiamaf/davidiamaf-pixel-null-guard
guard for null
This commit is contained in:
@@ -458,6 +458,9 @@ class Overlay extends BaseObject {
|
|||||||
.getView()
|
.getView()
|
||||||
.getCenterInternal());
|
.getCenterInternal());
|
||||||
const centerPx = map.getPixelFromCoordinateInternal(center);
|
const centerPx = map.getPixelFromCoordinateInternal(center);
|
||||||
|
if (!centerPx) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];
|
const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];
|
||||||
|
|
||||||
const panOptions = panIntoViewOptions.animation || {};
|
const panOptions = panIntoViewOptions.animation || {};
|
||||||
|
|||||||
Reference in New Issue
Block a user