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",
|
||||
"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.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -52,7 +52,7 @@ module.exports = function(RED) {
|
||||
node.on('input', function(msg) {
|
||||
let path = this.path
|
||||
if(msg && msg.payload){
|
||||
path = msg.payload.path
|
||||
path = path || msg.payload.path
|
||||
msgin = msg
|
||||
setUpListener(path)
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ module.exports = function(RED) {
|
||||
node.on('input', function(msg) {
|
||||
let path = this.path
|
||||
if(msg && msg.payload){
|
||||
path = msg.payload.path
|
||||
path = path || msg.payload.path
|
||||
msgin = msg
|
||||
setUpListener(path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user