add await for _clearStorage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
27ec81f1a2
commit
a8861f8893
1 changed files with 9 additions and 10 deletions
|
@ -313,7 +313,7 @@ async function _restoreFromLocalStorage(opts) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function _handleLoadSessionFailure(e) {
|
async function _handleLoadSessionFailure(e) {
|
||||||
console.error("Unable to load session", e);
|
console.error("Unable to load session", e);
|
||||||
|
|
||||||
const SessionRestoreErrorDialog =
|
const SessionRestoreErrorDialog =
|
||||||
|
@ -323,16 +323,15 @@ function _handleLoadSessionFailure(e) {
|
||||||
error: e.message,
|
error: e.message,
|
||||||
});
|
});
|
||||||
|
|
||||||
return modal.finished.then(([success]) => {
|
const [success] = await modal.finished;
|
||||||
if (success) {
|
if (success) {
|
||||||
// user clicked continue.
|
// user clicked continue.
|
||||||
_clearStorage();
|
await _clearStorage();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// try, try again
|
// try, try again
|
||||||
return loadSession();
|
return loadSession();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue