#12758: Allow undefined to be passed to control setMap(). Consequently the return type of getMap() now can also be undefined as well.

This commit is contained in:
Jackie Ng
2021-09-16 00:05:53 +10:00
parent 0efdef9b40
commit 67d885d6ef

View File

@@ -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() {
@@ -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) {