Apply strictNullChecks to src/components/auth/* (#10484

* Apply `strictNullChecks` to `src/components/auth/*`

* fix

* strict types
This commit is contained in:
Michael Telatynski 2023-03-31 09:26:15 +01:00 committed by GitHub
parent af151700c9
commit f152613f83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 17 deletions

View file

@ -29,7 +29,7 @@ export function AuthHeaderDisplay({ title, icon, serverPicker, children }: Props
if (!context) {
return <></>;
}
const current = context.state.length ? context.state[0] : null;
const current = context.state[0] ?? null;
return (
<Fragment>
{current?.icon ?? icon}