diff --git a/CHANGELOG.md b/CHANGELOG.md index b248fa4..630066a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v2.37.4 - Fix sessionid specific data not to be sent on reload/refresh - v2.37.3 - Fix hang on layer change - v2.37.2 - If custom layer is only layer then show it automatically. Issue #230 - v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229 diff --git a/README.md b/README.md index 768e787..821603d 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ map web page for plotting "things" on. ### Updates +- v2.37.4 - Fix sessionid specific data not to be sent on reload/refresh - v2.37.3 - Fix hang on layer change - v2.37.2 - If custom layer is only layer then show it automatically. Issue #230 - v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229 diff --git a/package.json b/package.json index e9abf90..3e08fb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "2.37.3", + "version": "2.37.4", "description": "A Node-RED node to provide a web page of a world map for plotting things on.", "dependencies": { "@turf/bezier-spline": "~6.5.0", diff --git a/worldmap.js b/worldmap.js index c57d39f..8848e61 100644 --- a/worldmap.js +++ b/worldmap.js @@ -120,6 +120,7 @@ module.exports = function(RED) { }); node.status({fill:"green",shape:"dot",text:"connected "+Object.keys(clients).length,_sessionid:client.id}); } + node.on('input', function(msg) { if (!msg.hasOwnProperty("payload")) { node.warn("Missing payload"); return; } if (msg.hasOwnProperty("_sessionid")) { @@ -134,7 +135,7 @@ module.exports = function(RED) { } } } - if (msg.payload.hasOwnProperty("name")) { + if (msg.payload.hasOwnProperty("name") && !msg.hasOwnProperty("_sessionid")) { allPoints[msg.payload.name] = RED.util.cloneMessage(msg.payload); var t = node.maxage || 3600; if (msg.payload.ttl && msg.payload.ttl < t) { t = msg.payload.ttl; }