diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 4e25d6b39..8cdf47385 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -833,7 +833,7 @@ map.on('commandstatechanged', function (e) { // For writer we get UI names; ideally we should be getting only programmatic ones // For eg: 'Text body' vs 'Text Body' // (likely to be fixed in core to make the pattern consistent) - if (value.toLowerCase() === state.toLowerCase()) { + if (state && value.toLowerCase() === state.toLowerCase()) { state = value; found = true; return;