mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
pushover: ensure handles missing payload.
This commit is contained in:
parent
436f169fd4
commit
92adb10fb3
@ -42,6 +42,7 @@ module.exports = function(RED) {
|
||||
if (isNaN(pri)) {pri=0;}
|
||||
if (pri > 2) {pri = 2;}
|
||||
if (pri < -2) {pri = -2;}
|
||||
if (!msg.payload) { msg.payload = ""; }
|
||||
if (typeof(msg.payload) === 'object') {
|
||||
msg.payload = JSON.stringify(msg.payload);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-pushover",
|
||||
"version" : "0.0.17",
|
||||
"version" : "0.0.18",
|
||||
"description" : "A Node-RED node to send alerts via Pushover",
|
||||
"dependencies" : {
|
||||
"pushover-notifications" : "^1.2.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user