Fix base_url being undefined on unsuccessful login (#18)

* Fix base_url being undefined on unsuccessful login

* update readme
This commit is contained in:
Borislav Pantaleev
2024-09-05 23:23:17 +03:00
committed by GitHub
parent 390aab5ce7
commit e093bd8625
4 changed files with 9 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ const authProvider: AuthProvider = {
if (!base_url) {
// there is some kind of bug with base_url being present in the form, but not submitted
// ref: https://github.com/etkecc/synapse-admin/issues/14
localStorage.removeItem("base_url")
storage.removeItem("base_url")
throw new Error("Homeserver URL is required.");
}
base_url = base_url.replace(/\/+$/g, "");