loleaflet: avoid Uncaught TypeError: Cannot read property
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
This commit is contained in:
parent
b9fbc6d369
commit
fa02df7ad3
1 changed files with 1 additions and 1 deletions
2
loleaflet/dist/toolbar/toolbar.js
vendored
2
loleaflet/dist/toolbar/toolbar.js
vendored
|
@ -833,7 +833,7 @@ map.on('commandstatechanged', function (e) {
|
||||||
// For writer we get UI names; ideally we should be getting only programmatic ones
|
// For writer we get UI names; ideally we should be getting only programmatic ones
|
||||||
// For eg: 'Text body' vs 'Text Body'
|
// For eg: 'Text body' vs 'Text Body'
|
||||||
// (likely to be fixed in core to make the pattern consistent)
|
// (likely to be fixed in core to make the pattern consistent)
|
||||||
if (value.toLowerCase() === state.toLowerCase()) {
|
if (state && value.toLowerCase() === state.toLowerCase()) {
|
||||||
state = value;
|
state = value;
|
||||||
found = true;
|
found = true;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue