mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Fix: Warnings with no ttl
Check if ttl exists before sanitizing
This commit is contained in:
parent
da6bd8b621
commit
3f23212514
@ -63,9 +63,11 @@ module.exports = function(RED) {
|
||||
expire = 10800;
|
||||
node.warn("Expire time too high, using maximum setting of 10800s (3 hours) retry duration");
|
||||
}
|
||||
if (!Number.isInteger(ttl) || ttl<=0) {
|
||||
ttl = null;
|
||||
node.warn("No valid number for TTL found, not set");
|
||||
if (ttl !== null) {
|
||||
if(!Number.isInteger(ttl) || ttl <= 0) {
|
||||
ttl = null;
|
||||
node.warn("No valid number for TTL found, not set");
|
||||
}
|
||||
}
|
||||
if (typeof msg.payload === 'undefined') { msg.payload = "(undefined msg.payload)"; }
|
||||
if (typeof(msg.payload) === 'object') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user