adding guard for other components already initalized firebase-admin

This commit is contained in:
Peter Svensson
2019-07-16 10:39:44 +02:00
parent 3b0931fde2
commit d8e42e59d7
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ const _admin = require('firebase-admin')
const {Storage} = require('@google-cloud/storage');
let global = this.context().global
let init = (global.get('firebase') !== undefined)
let init = !(_admin.apps.length === 0)
let s
module.exports = function(RED) {