Skip to content

Commit

Permalink
Fix login problem (unathorized user cannot login). (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanovic authored Nov 1, 2019
1 parent 9016805 commit 1487cea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cvat-ui/src/components/cvat-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 1487cea

Please sign in to comment.