How to scope Firebase in nested promise Cloud Functions
问题 I am trying to set a few variables from Firebase and then pass those into a anotherfunction. Currently, the Promise.all is properly setting foo and bar, but an error is being thrown during the .then , so the response isn't getting set in Firebase. const functions = require('firebase-functions'), admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.someFunc = functions.database.ref(`/data`).onWrite(event => { const condition = event.data.val() if