Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/lib/components/ProviderLogin/provider-login.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ export default class LoginComponent extends Component<Props> {
storage: localStorage
});

if (!session) {
/**
* This condition checks if the session is null or undefined, we can have those 2 kind of values in return
* Null would be the validation for the non existing pod provider
* undefined will be session doesn't existing and/or the request is still pending
*/
if (!session && session === null) {
throw new SolidError(errorsText.unknown, 'unknown');
}
return session;
Expand All @@ -96,10 +101,7 @@ export default class LoginComponent extends Component<Props> {
if (onError) {
onError(error);
}
// Show form error messsage when idp is null
if (error.name !== 'unknown') {
this.setState({ error });
}
this.setState({ error });
}
};

Expand Down