You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this module to read a value in a Firebase Realtime DB node for an ongoing login.
Here is a code snippet:
consttryGetAuthStatus=(user)=>newPromise((resolve,reject)=>{varlogin_node=user.child(provider)if(login_node.exists()){resolve(login_node.val().status)}})ref.child(uuid).once('value')// Returns a promise.then((user)=>intervalPromise(async(iteration,stop)=>awaittryGetAuthStatus(user),// Returns a promiseattempts_pause,{iterations: attempts_max,stopOnError: true})).then((result)=>console.log(result))// undefined
As you can see I'm returning the interval to continue the promise chain. When firebaseTryGetAuth resolves, it returns the correct result (e.g. "authorized"), but the last 'then' in the chain gets no result from the returned intervalPromise. How can I propagate the result?
The text was updated successfully, but these errors were encountered:
I'm using this module to read a value in a Firebase Realtime DB node for an ongoing login.
Here is a code snippet:
As you can see I'm returning the interval to continue the promise chain. When firebaseTryGetAuth resolves, it returns the correct result (e.g. "authorized"), but the last 'then' in the chain gets no result from the returned intervalPromise. How can I propagate the result?
The text was updated successfully, but these errors were encountered: