Fix to not store old session specific data
to close #233 to close #234 to close #235
This commit is contained in:
parent
1a5f75f853
commit
132d3b5871
@ -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
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user