Fixes #49 send contact to correct contact
This commit is contained in:
parent
17ae639c1b
commit
0bca8542ef
1 changed files with 5 additions and 3 deletions
|
|
@ -126,9 +126,11 @@ class ContactScreen extends React.Component {
|
|||
|
||||
transferContact() {
|
||||
/** @type {import('./../Models/User').User} */
|
||||
const nextUser = this.props.users.filter(
|
||||
user => user.id !== this.props.currentUser.id,
|
||||
)[this.state.selectedTransferUserIndex];
|
||||
const nextUser = this.props.users
|
||||
.filter(user => user.id !== this.props.currentUser.id)
|
||||
.sort(Helpers.compareValues('email', 'asc'))[
|
||||
this.state.selectedTransferUserIndex
|
||||
];
|
||||
/** @type {import('./../Models/Contact').ContactData} cloned contact */
|
||||
const transferContact = this.state.contactToTransfer.toJSON();
|
||||
if (transferContact === null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue