Fix login problem (unathorized user cannot login). (#812)

main
Nikita Manovich 6 years ago committed by GitHub
parent 9016805f8e
commit 1487ceafb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,7 +42,8 @@ export default class CVATApplication extends React.PureComponent<CVATAppProps> {
}
public componentDidUpdate() {
if (!this.props.userInitialized) {
if (!this.props.userInitialized ||
this.props.userInitialized && this.props.user == null) {
return;
}
@ -89,10 +90,10 @@ export default class CVATApplication extends React.PureComponent<CVATAppProps> {
// Where you go depends on your URL
public render() {
const readyForRender = this.props.userInitialized
&& this.props.formatsInitialized
&& this.props.pluginsInitialized
&& this.props.usersInitialized;
const readyForRender =
(this.props.userInitialized && this.props.user == null) ||
(this.props.userInitialized && this.props.formatsInitialized &&
this.props.pluginsInitialized &&this.props.usersInitialized);
if (readyForRender) {
if (this.props.user) {

Loading…
Cancel
Save