Improve provider empty cases

This commit is contained in:
mauriziovitale84
2016-11-11 15:28:07 +00:00
parent 93ec758911
commit 0db8460623
2 changed files with 3 additions and 7 deletions

View File

@@ -92,9 +92,7 @@ export class LoginDemoComponent implements OnInit {
this.providers = ''; this.providers = '';
} }
if (this.providers) { localStorage.setItem('providers', this.providers);
localStorage.setItem('providers', this.providers);
}
} }
toggleBPM(checked) { toggleBPM(checked) {
@@ -108,9 +106,7 @@ export class LoginDemoComponent implements OnInit {
this.providers = ''; this.providers = '';
} }
if (this.providers) { localStorage.setItem('providers', this.providers);
localStorage.setItem('providers', this.providers);
}
} }
toggleCSRF() { toggleCSRF() {

View File

@@ -171,7 +171,7 @@ export class AlfrescoLoginComponent implements OnInit {
* @returns {boolean} * @returns {boolean}
*/ */
private checkRequiredParams(): boolean { private checkRequiredParams(): boolean {
if (this.providers === undefined) { if (this.providers === undefined || this.providers === null || this.providers === '') {
this.errorMsg = 'LOGIN.MESSAGES.LOGIN-ERROR-PROVIDERS'; this.errorMsg = 'LOGIN.MESSAGES.LOGIN-ERROR-PROVIDERS';
this.enableError(); this.enableError();
let messageProviders: any; let messageProviders: any;