From 67d885d6ef828d37f9869a690f64ff2ffb28b4ad Mon Sep 17 00:00:00 2001 From: Jackie Ng Date: Thu, 16 Sep 2021 00:05:53 +1000 Subject: [PATCH] #12758: Allow undefined to be passed to control setMap(). Consequently the return type of getMap() now can also be undefined as well. --- src/ol/control/Control.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/control/Control.js b/src/ol/control/Control.js index 81cef9b6d8..b94f705b8d 100644 --- a/src/ol/control/Control.js +++ b/src/ol/control/Control.js @@ -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) {