Skip to content

Commit

Permalink
Only open AddUserDialog if email input is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkdoor committed Nov 30, 2016
1 parent 30bda2c commit c646956
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/components/VaultSettingsBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ class VaultSettingsBar extends SyncryptComponent {

addUser() {
this.withOwnerPermissions(() => {
let email = this.getFormValueByRef('email');
this.props.dispatch(refreshUserKeys(email));
this.setState({
showAddDialog: true,
addDialogEmail: email
})
let email = this.getFormValueByRef('email').trim();
if(email != "") {
this.props.dispatch(refreshUserKeys(email));
this.setState({
showAddDialog: true,
addDialogEmail: email
})
}
})
}

Expand Down

0 comments on commit c646956

Please sign in to comment.