fix: lint

This commit is contained in:
Nya Candy 2021-10-07 01:54:51 +08:00
parent 6ada5619f3
commit e6a17b41f0
No known key found for this signature in database
GPG Key ID: 8B1BE5E86F2E66AE

View File

@ -91,8 +91,10 @@ const LoginPage = ({ theme }) => {
const ssoToken = loginToken[1]; const ssoToken = loginToken[1];
console.log("SSO token is", ssoToken); console.log("SSO token is", ssoToken);
// Prevent further requests // Prevent further requests
window.history.replaceState({}, '', window.history.replaceState(
window.location.href.replace(loginToken[0], '#').split('#')[0] {},
"",
window.location.href.replace(loginToken[0], "#").split("#")[0]
); );
const baseUrl = localStorage.getItem("sso_base_url"); const baseUrl = localStorage.getItem("sso_base_url");
localStorage.removeItem("sso_base_url"); localStorage.removeItem("sso_base_url");
@ -231,10 +233,11 @@ const LoginPage = ({ theme }) => {
.catch(_ => { .catch(_ => {
setServerVersion(""); setServerVersion("");
}); });
// Set SSO Url // Set SSO Url
const authMethodUrl = `${formData.base_url}/_matrix/client/r0/login`; const authMethodUrl = `${formData.base_url}/_matrix/client/r0/login`;
let supportPass = false, supportSSO = false; let supportPass = false,
supportSSO = false;
fetchUtils fetchUtils
.fetchJson(authMethodUrl, { method: "GET" }) .fetchJson(authMethodUrl, { method: "GET" })
.then(({ json }) => { .then(({ json }) => {