added guard for payload without path in rtdb-get and rtdb-on

This commit is contained in:
Peter Svensson
2019-07-21 12:54:19 +02:00
parent 87a2ed5022
commit 3ca32c00ae
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "node-red-contrib-firebase-admin", "name": "node-red-contrib-firebase-admin",
"version": "1.1.14", "version": "1.1.15",
"description": "A node-red module that wraps the server-side admin SDK of firebase, firestore, et.c.", "description": "A node-red module that wraps the server-side admin SDK of firebase, firestore, et.c.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -52,7 +52,7 @@ module.exports = function(RED) {
node.on('input', function(msg) { node.on('input', function(msg) {
let path = this.path let path = this.path
if(msg && msg.payload){ if(msg && msg.payload){
path = msg.payload.path path = path || msg.payload.path
msgin = msg msgin = msg
setUpListener(path) setUpListener(path)
} }

View File

@ -54,7 +54,7 @@ module.exports = function(RED) {
node.on('input', function(msg) { node.on('input', function(msg) {
let path = this.path let path = this.path
if(msg && msg.payload){ if(msg && msg.payload){
path = msg.payload.path path = path || msg.payload.path
msgin = msg msgin = msg
setUpListener(path) setUpListener(path)
} }