Fix restoring sessions
This commit is contained in:
parent
aa6bbbaaa0
commit
d1e645fbc0
1 changed files with 2 additions and 1 deletions
|
@ -23,7 +23,7 @@ import React, {
|
||||||
useContext,
|
useContext,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
import { initClient } from "./matrix-utils";
|
import { initClient, defaultHomeserver } from "./matrix-utils";
|
||||||
|
|
||||||
const ClientContext = createContext();
|
const ClientContext = createContext();
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ export function ClientProvider({ children }) {
|
||||||
|
|
||||||
return { client: undefined };
|
return { client: undefined };
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
localStorage.removeItem("matrix-auth-store");
|
localStorage.removeItem("matrix-auth-store");
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue