Use options object

pull/21833/head
David Baker 2019-08-02 16:44:49 +01:00
parent 1c156f0a5a
commit 9ef24352d0
1 changed files with 6 additions and 2 deletions

View File

@ -99,7 +99,9 @@ export async function loadSession(opts) {
guest: true,
}, true).then(() => true);
}
const success = await _restoreFromLocalStorage(Boolean(opts.ignoreGuest));
const success = await _restoreFromLocalStorage({
ignoreGuest: Boolean(opts.ignoreGuest),
});
if (success) {
return true;
}
@ -275,7 +277,9 @@ export function getLocalStorageSessionVars() {
// The plan is to gradually move the localStorage access done here into
// SessionStore to avoid bugs where the view becomes out-of-sync with
// localStorage (e.g. isGuest etc.)
async function _restoreFromLocalStorage(ignoreGuest) {
async function _restoreFromLocalStorage(opts) {
const ignoreGuest = opts.ignoreGuest;
if (!localStorage) {
return false;
}