added guard for payload without path in rtdb-get and rtdb-on
This commit is contained in:
@ -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": {
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user