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(
611611 // can be disabled to resolve "Cannot dispatch in the middle of a dispatch."
612612 // error when it is invoked via another dispatch that is not yet finished.
613613 if ( dispatchOnLoggingIn ) {
614- dis . dispatch ( { action : "on_logging_in" } , true ) ;
614+ dis . dispatch ( { action : Action . OnLoggingIn } , true ) ;
615615 }
616616
617617 if ( clearStorageEnabled ) {
Original file line number Diff line number Diff line change @@ -326,6 +326,11 @@ export enum Action {
326326 */
327327 OnLoggedOut = "on_logged_out" ,
328328
329+ /**
330+ * Fired when the client has started to log in. No additional payload information required.
331+ */
332+ OnLoggingIn = "on_logging_in" ,
333+
329334 /**
330335 * Fired when the client was logged in. No additional payload information required.
331336 */
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ describe("Lifecycle", () => {
6969 // promise to wait 'on_logging_in'
7070 const loggingInPromise = new Promise ( ( resolve , reject ) => {
7171 defaultDispatcher . register ( ( payload : ActionPayload ) => {
72- if ( payload . action === "on_logging_in" ) {
72+ if ( payload . action === Action . OnLoggingIn ) {
7373 resolve ( undefined ) ;
7474 }
7575 } ) ;
You can’t perform that action at this time.
0 commit comments