Fix restoring sessions

This commit is contained in:
Robert Long 2022-01-06 13:33:13 -08:00
parent aa6bbbaaa0
commit d1e645fbc0

View file

@ -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;
} }