web/admin: fix provider type resetting when changing provider type

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-17 19:06:56 +02:00
parent d2dd7d1366
commit 4add0bbe86
1 changed files with 4 additions and 0 deletions

View File

@ -141,6 +141,10 @@ export class OAuthSourceForm extends Form<OAuthSource> {
} else { } else {
this.showUrlOptions = false; this.showUrlOptions = false;
} }
if (!this.source) {
this.source = {} as OAuthSource;
}
this.source.providerType = selected.value;
}}> }}>
${until(new SourcesApi(DEFAULT_CONFIG).sourcesOauthSourceTypes().then(types => { ${until(new SourcesApi(DEFAULT_CONFIG).sourcesOauthSourceTypes().then(types => {
return types.map(type => { return types.map(type => {