Fix allPoints object pass by ref feedback error

to close #194
pull/197/head
Dave Conway-Jones 3 years ago
parent b5553b2acb
commit 809ae45a3e
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

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

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

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

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

Loading…
Cancel
Save