fix: Fix language selection bug

This commit is contained in:
Jay Sitter 2023-06-23 17:21:10 -04:00
parent bf54d40433
commit ccf0a6dbaa
4 changed files with 18 additions and 10 deletions

View file

@ -326,10 +326,12 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
render() {
const url = this.state.form.url;
const userInterfaceLangId = getUserInterfaceLangId({
myUserInfo: UserService.Instance.myUserInfo,
allLanguages: this.props.allLanguages,
});
const userInterfaceLangId = !UserService.Instance.myUserInfo
? 0
: getUserInterfaceLangId({
myUserInfo: UserService.Instance.myUserInfo,
allLanguages: this.props.allLanguages,
});
return (
<form className="post-form" onSubmit={linkEvent(this, handlePostSubmit)}>