mirror of https://github.com/vector-im/riot-web
				
				
				
			add await for _clearStorage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
							parent
							
								
									27ec81f1a2
								
							
						
					
					
						commit
						a8861f8893
					
				|  | @ -313,7 +313,7 @@ async function _restoreFromLocalStorage(opts) { | |||
|     } | ||||
| } | ||||
| 
 | ||||
| function _handleLoadSessionFailure(e) { | ||||
| async function _handleLoadSessionFailure(e) { | ||||
|     console.error("Unable to load session", e); | ||||
| 
 | ||||
|     const SessionRestoreErrorDialog = | ||||
|  | @ -323,16 +323,15 @@ function _handleLoadSessionFailure(e) { | |||
|         error: e.message, | ||||
|     }); | ||||
| 
 | ||||
|     return modal.finished.then(([success]) => { | ||||
|         if (success) { | ||||
|             // user clicked continue.
 | ||||
|             _clearStorage(); | ||||
|             return false; | ||||
|         } | ||||
|     const [success] = await modal.finished; | ||||
|     if (success) { | ||||
|         // user clicked continue.
 | ||||
|         await _clearStorage(); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|         // try, try again
 | ||||
|         return loadSession(); | ||||
|     }); | ||||
|     // try, try again
 | ||||
|     return loadSession(); | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Michael Telatynski
						Michael Telatynski