Bump milsymbol version, test for layer control before removal
This commit is contained in:
parent
662b9bbc64
commit
552c65b812
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-web-worldmap",
|
||||
"version": "2.0.12",
|
||||
"version": "2.0.13",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"cgi": "0.3.1",
|
||||
|
File diff suppressed because one or more lines are too long
@ -1501,7 +1501,7 @@ function doCommand(cmd) {
|
||||
if (cmd.hasOwnProperty("showlayers")) {
|
||||
if ((cmd.showlayers === "hide") && (showLayerMenu === true)) {
|
||||
showLayerMenu = false;
|
||||
layercontrol.removeFrom(map);
|
||||
if (layercontrol) { layercontrol.removeFrom(map); }
|
||||
}
|
||||
else if ((cmd.showlayers === "show") && (showLayerMenu === false)) {
|
||||
showLayerMenu = true;
|
||||
|
Loading…
Reference in New Issue
Block a user