From 04323e1e7c13ff7c22e7d582e9b26ab85c43fc41 Mon Sep 17 00:00:00 2001 From: olaf-cloudgenix Date: Wed, 13 Nov 2019 10:21:52 -0800 Subject: [PATCH] Guard against this._controlContainer being undefined (#1310) --- src/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map.js b/src/map.js index edaf91219..8509280c6 100644 --- a/src/map.js +++ b/src/map.js @@ -154,7 +154,7 @@ var LMap = L.Map.extend({ }, _updateMapFeedbackLink: function() { - if (!this._controlContainer.getElementsByClassName) return; + if (!this._controlContainer || !this._controlContainer.getElementsByClassName) return; var link = this._controlContainer.getElementsByClassName('mapbox-improve-map'); if (link.length && this._loaded) { var center = this.getCenter().wrap();