commit 92d82df604ca4af9b5400626e6bd484109dfa682
parent 31fea201974c9beb373fd9c52e648b9de639e03a
Author: MTRNord <mtrnord1@gmail.com>
Date: Mon, 7 Feb 2022 15:17:42 +0100
Fix if condition
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/Header.tsx b/components/Header.tsx
@@ -41,7 +41,7 @@ export default class Header extends PureComponent<Props, State> {
const data = await fetch("/api/directory", { method: "GET" });
const data_parsed = await data.json();
const directory_data = data_parsed.data;
- this.setState({ directory_data: directory_data, loading: false, loggedIn: this.context.client.isGuest ? !this.context.client.isGuest : false });
+ this.setState({ directory_data: directory_data, loading: false, loggedIn: !this.context.client.isGuest});
} catch {
console.error("Failed to get directory");
this.setState({ error: "Failed to get directory" });