[auth][android][js] Stop removing all listeners when using phone auth
This commit is contained in:
parent
c2d25724ff
commit
807e581ec7
|
@ -141,18 +141,14 @@ export default class PhoneAuthListener {
|
||||||
_removeAllListeners() {
|
_removeAllListeners() {
|
||||||
setTimeout(() => { // move to next event loop - not sure if needed
|
setTimeout(() => { // move to next event loop - not sure if needed
|
||||||
// internal listeners
|
// internal listeners
|
||||||
const events = Object.values(this._internalEvents);
|
Object.values(this._internalEvents).forEach((event) => {
|
||||||
|
this._auth.removeAllListeners(event);
|
||||||
for (let i = 0, len = events.length; i < len; i++) {
|
});
|
||||||
this._auth.removeAllListeners(events[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// user observer listeners
|
// user observer listeners
|
||||||
const publicEvents = Object.values(this._publicEvents);
|
Object.values(this._publicEvents).forEach((publicEvent) => {
|
||||||
|
this._auth.removeAllListeners(publicEvent);
|
||||||
for (let i = 0, len = events.length; i < len; i++) {
|
});
|
||||||
this._auth.removeAllListeners(publicEvents[i]);
|
|
||||||
}
|
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue