fix querying captial names

This commit is contained in:
gempir 2020-11-13 18:47:11 +01:00
parent 77bd56921b
commit 322f436c8b
2 changed files with 29 additions and 26 deletions

File diff suppressed because one or more lines are too long

View file

@ -71,6 +71,9 @@ const StateProvider = ({ children }: { children: JSX.Element }): JSX.Element =>
}
const setCurrents = (currentChannel: string | null = null, currentUsername: string | null = null) => {
currentChannel = currentChannel?.toLowerCase() ?? null;
currentUsername = currentChannel?.toLowerCase() ?? null;
setState({ ...state, currentChannel, currentUsername, error: false });
const url = new URL(window.location.href);