Skip to content

Commit

Permalink
Merge pull request #12759 from jumpinjackie/fix/control-typings
Browse files Browse the repository at this point in the history
#12758: Allow undefined to be passed to control setMap(). Also fix type of getMap()
  • Loading branch information
ahocevar committed Sep 17, 2021
2 parents c57c898 + 67d885d commit 0d06f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ol/control/Control.js
Expand Up @@ -98,7 +98,7 @@ class Control extends BaseObject {

/**
* Get the map associated with this control.
* @return {import("../PluggableMap.js").default} Map.
* @return {import("../PluggableMap.js").default|undefined} Map.
* @api
*/
getMap() {
Expand All @@ -109,7 +109,7 @@ class Control extends BaseObject {
* Remove the control from its current map and attach it to the new map.
* Subclasses may set up event handlers to get notified about changes to
* the map here.
* @param {import("../PluggableMap.js").default} map Map.
* @param {import("../PluggableMap.js").default} [map] Map.
* @api
*/
setMap(map) {
Expand Down

0 comments on commit 0d06f7b

Please sign in to comment.