Skip to content

Commit 1487cea

Browse files
authored
Fix login problem (unathorized user cannot login). (#812)
1 parent 9016805 commit 1487cea

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cvat-ui/src/components/cvat-app.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export default class CVATApplication extends React.PureComponent<CVATAppProps> {
4242
}
4343

4444
public componentDidUpdate() {
45-
if (!this.props.userInitialized) {
45+
if (!this.props.userInitialized ||
46+
this.props.userInitialized && this.props.user == null) {
4647
return;
4748
}
4849

@@ -89,10 +90,10 @@ export default class CVATApplication extends React.PureComponent<CVATAppProps> {
8990

9091
// Where you go depends on your URL
9192
public render() {
92-
const readyForRender = this.props.userInitialized
93-
&& this.props.formatsInitialized
94-
&& this.props.pluginsInitialized
95-
&& this.props.usersInitialized;
93+
const readyForRender =
94+
(this.props.userInitialized && this.props.user == null) ||
95+
(this.props.userInitialized && this.props.formatsInitialized &&
96+
this.props.pluginsInitialized &&this.props.usersInitialized);
9697

9798
if (readyForRender) {
9899
if (this.props.user) {

0 commit comments

Comments
 (0)