mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-13 22:44:11 +08:00
[auth] create a stack trace for phone auth listener (fixes #2639#issuecomment-539915313)
This commit is contained in:
@@ -26,6 +26,7 @@ export default class PhoneAuthListener {
|
||||
this._reject = null;
|
||||
this._resolve = null;
|
||||
this._promise = null;
|
||||
this._jsStack = new Error().stack;
|
||||
|
||||
this._timeout = timeout || 20;
|
||||
this._phoneAuthRequestId = REQUEST_ID++;
|
||||
@@ -172,7 +173,7 @@ export default class PhoneAuthListener {
|
||||
state: 'error',
|
||||
};
|
||||
|
||||
snapshot.error = new NativeFirebaseError({ userInfo: state.error }, null, 'auth');
|
||||
snapshot.error = new NativeFirebaseError({ userInfo: state.error }, this._jsStack, 'auth');
|
||||
|
||||
this._emitToObservers(snapshot);
|
||||
this._emitToErrorCb(snapshot);
|
||||
|
||||
Reference in New Issue
Block a user