File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ function Authenticate(parameters: Parameters): Promise<Response | void> {
6969/**
7070 * Reauthenticate using the stored credentials and redirect to the sign in page if unable to do so.
7171 * @param [command] command name for logging purposes
72- * @return { Promise<boolean> } Returns true if reauthentication was successful, false otherwise.
72+ * @return returns true if reauthentication was successful, false otherwise.
7373 */
7474function reauthenticate ( command = '' ) : Promise < boolean > {
7575 Log . hmmm ( 'Reauthenticate - Attempting re-authentication' , {
Original file line number Diff line number Diff line change @@ -52,7 +52,10 @@ export default function (): Promise<boolean> {
5252 // authenticate with a predefined user
5353 console . debug ( '[E2E] Signing in…' ) ;
5454 Authenticate ( e2eUserCredentials )
55- ?. then ( ( response ) => {
55+ . then ( ( response ) => {
56+ if ( ! response ) {
57+ return ;
58+ }
5659 Onyx . merge ( ONYXKEYS . SESSION , {
5760 authToken : response . authToken ,
5861 creationDate : new Date ( ) . getTime ( ) ,
You can’t perform that action at this time.
0 commit comments