mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-24 08:35:31 +03:00
correctly treat empty or "almost empty" restrictBaseUrl config option, fixes #56
This commit is contained in:
parent
a42efe7eda
commit
f5d6f24b30
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ const LoginPage = () => {
|
|||
const notify = useNotify();
|
||||
const { restrictBaseUrl } = useAppContext();
|
||||
const allowSingleBaseUrl = typeof restrictBaseUrl === "string";
|
||||
const allowMultipleBaseUrls = Array.isArray(restrictBaseUrl);
|
||||
const allowMultipleBaseUrls = (Array.isArray(restrictBaseUrl) && restrictBaseUrl.length > 0 && restrictBaseUrl[0] !== "" && restrictBaseUrl[0] !== null);
|
||||
const allowAnyBaseUrl = !(allowSingleBaseUrl || allowMultipleBaseUrls);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [supportPassAuth, setSupportPassAuth] = useState(true);
|
||||
|
|
Loading…
Reference in a new issue