Bump milsymbol version, test for layer control before removal

This commit is contained in:
Dave Conway-Jones 2019-06-12 13:18:33 -04:00
parent 662b9bbc64
commit 552c65b812
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
3 changed files with 28 additions and 33 deletions

View File

@ -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

View File

@ -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;