From 09dfaa052fcce54084b65324283e351114e483cd Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 8 Aug 2019 12:28:53 +0100 Subject: [PATCH] add missing brace --- CHANGELOG.md | 3 ++- README.md | 2 +- package.json | 2 +- worldmap/worldmap.js | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 560e899..9edf361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### Change Log for Node-RED Worldmap - - v2.0.18 - Stop map contextmenu bleedthrough to marker. Add compress middleware. + - v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110. + - v2.0.18 - Stop map contextmenu bleedthrough to marker. Add compress middleware. - v2.0.17 - Let clear command also clear tracks from tracks node - v2.0.16 - Revert use of ES6 import. Keep IE11 happy for while - v2.0.13 - Fix tracks colour diff --git a/README.md b/README.md index b28a12e..c8adf2e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ map web page for plotting "things" on. ### Updates -- v2.0.19 - ensure `fit` option is boolean, Issue #109. Fix tracks, Issue #110. +- v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110. - v2.0.18 - Stop map contextmenu bleedthrough to marker. Add compress middleware. - v2.0.17 - Let clear command also clear tracks from tracks node - v2.0.16 - Revert use of ES6 import. Keep IE11 happy for while diff --git a/package.json b/package.json index 84e45ed..e6ed310 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "2.0.19", + "version": "2.0.20", "description": "A Node-RED node to provide a web page of a world map for plotting things on.", "dependencies": { "cgi": "0.3.1", diff --git a/worldmap/worldmap.js b/worldmap/worldmap.js index 77f5e8f..f31a9e3 100644 --- a/worldmap/worldmap.js +++ b/worldmap/worldmap.js @@ -1678,7 +1678,7 @@ function doCommand(cmd) { layercontrol.addOverlay(overlays[cmd.map.overlay],cmd.map.overlay); } map.addLayer(overlays[cmd.map.overlay]); - if (cmd.map.hasOwnProperty("fit") && cmd.map.fit === true)) { map.fitBounds(overlays[cmd.map.overlay].getBounds()); } + if (cmd.map.hasOwnProperty("fit") && (cmd.map.fit === true)) { map.fitBounds(overlays[cmd.map.overlay].getBounds()); } } // Add a new NVG XML overlay layer if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("nvg") ) {