This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -611,7 +611,7 @@ async function doSetLoggedIn(
611
611
// can be disabled to resolve "Cannot dispatch in the middle of a dispatch."
612
612
// error when it is invoked via another dispatch that is not yet finished.
613
613
if ( dispatchOnLoggingIn ) {
614
- dis . dispatch ( { action : "on_logging_in" } , true ) ;
614
+ dis . dispatch ( { action : Action . OnLoggingIn } , true ) ;
615
615
}
616
616
617
617
if ( clearStorageEnabled ) {
Original file line number Diff line number Diff line change @@ -326,6 +326,11 @@ export enum Action {
326
326
*/
327
327
OnLoggedOut = "on_logged_out" ,
328
328
329
+ /**
330
+ * Fired when the client has started to log in. No additional payload information required.
331
+ */
332
+ OnLoggingIn = "on_logging_in" ,
333
+
329
334
/**
330
335
* Fired when the client was logged in. No additional payload information required.
331
336
*/
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ describe("Lifecycle", () => {
69
69
// promise to wait 'on_logging_in'
70
70
const loggingInPromise = new Promise ( ( resolve , reject ) => {
71
71
defaultDispatcher . register ( ( payload : ActionPayload ) => {
72
- if ( payload . action === "on_logging_in" ) {
72
+ if ( payload . action === Action . OnLoggingIn ) {
73
73
resolve ( undefined ) ;
74
74
}
75
75
} ) ;
You can’t perform that action at this time.
0 commit comments