mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 14:45:20 +00:00
Fix error during new site setup (#596)
* Fix error during new site setup * remove logging
This commit is contained in:
parent
3fe9dc0d7b
commit
0619b162d6
|
@ -28,7 +28,7 @@ export class App extends Component<AppProps, any> {
|
|||
<div>
|
||||
<Theme
|
||||
myUserInfo={siteRes.my_user}
|
||||
defaultTheme={siteRes.site_view.site.default_theme}
|
||||
defaultTheme={siteRes?.site_view?.site?.default_theme}
|
||||
/>
|
||||
{siteRes &&
|
||||
siteRes.site_view &&
|
||||
|
|
|
@ -4,7 +4,7 @@ import { MyUserInfo } from "lemmy-js-client";
|
|||
|
||||
interface Props {
|
||||
myUserInfo: MyUserInfo | undefined;
|
||||
defaultTheme: string;
|
||||
defaultTheme?: string;
|
||||
}
|
||||
|
||||
export class Theme extends Component<Props> {
|
||||
|
@ -22,7 +22,10 @@ export class Theme extends Component<Props> {
|
|||
/>
|
||||
</Helmet>
|
||||
);
|
||||
} else if (this.props.defaultTheme != "browser") {
|
||||
} else if (
|
||||
this.props.defaultTheme != null &&
|
||||
this.props.defaultTheme != "browser"
|
||||
) {
|
||||
return (
|
||||
<Helmet>
|
||||
<link
|
||||
|
|
Loading…
Reference in a new issue