adding guard for other components already initalized firebase-admin
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
|
||||
let storage
|
||||
|
||||
module.exports = function(RED) {
|
||||
|
||||
function FirebaseAdmin(config) {
|
||||
@ -14,9 +14,13 @@ module.exports = function(RED) {
|
||||
storage = this.storage
|
||||
this.bucket = config.bucket || c.bucket
|
||||
this.path = config.path
|
||||
console.log('storage-read set this.storage')
|
||||
console.log('storage-read set this.storage to '+c.storage)
|
||||
console.log('config is '+config)
|
||||
}
|
||||
|
||||
let global = this.context().global
|
||||
this.torage = global.get('cloud-storage')
|
||||
|
||||
//console.log('configuring storage-read to listen for messages')
|
||||
node.on('input', function(msg) {
|
||||
if(msg && msg.payload){
|
||||
|
||||
Reference in New Issue
Block a user