From 809ae45a3e4b039a5cb778eb4ba93478e3a3f7d3 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 6 Feb 2022 17:18:57 +0000 Subject: [PATCH] Fix allPoints object pass by ref feedback error to close #194 --- CHANGELOG.md | 2 +- README.md | 2 +- package.json | 2 +- worldmap.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5df605d..0456cb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ### Change Log for Node-RED Worldmap - - v2.27.0 - Reload existing markers for late joiners + - v2.27.1 - Reload existing markers for late joiners - v2.26.1 - Add QTH/Maidenhead option also - v2.26.0 - Add UTM and MGRS to coordinate display options. - v2.25.0 - Add bounds command to set overall map bounds. diff --git a/README.md b/README.md index 46f3f30..8445dce 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ map web page for plotting "things" on. ### Updates -- v2.27.0 - Reload existing markers for late joiners +- v2.27.1 - Reload existing markers for late joiners - v2.26.1 - Add QTH/Maidenhead option also - v2.26.0 - Add UTM and MGRS to coordinate display options. - v2.25.0 - Add bounds command to set overall map bounds. diff --git a/package.json b/package.json index f30acbc..fda59ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "2.27.0", + "version": "2.27.1", "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 a03c666..fd60685 100644 --- a/worldmap.js +++ b/worldmap.js @@ -126,7 +126,7 @@ module.exports = function(RED) { } } if (msg.payload.hasOwnProperty("name")) { - allPoints[msg.payload.name] = msg.payload; + 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; } allPoints[msg.payload.name].tout = setTimeout( function() { delete allPoints[msg.payload.name] }, t * 1000 );