Fix setting center to undefined
It only worked when the coordinate warning was shown, but fromUserCoordinate shouldn't have been called with undefined in the first place.
This commit is contained in:
@@ -1636,7 +1636,9 @@ class View extends BaseObject {
|
||||
* @api
|
||||
*/
|
||||
setCenter(center) {
|
||||
this.setCenterInternal(fromUserCoordinate(center, this.getProjection()));
|
||||
this.setCenterInternal(
|
||||
center ? fromUserCoordinate(center, this.getProjection()) : center
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user