Merge pull request #4330 from emanuelschuetze/fixUpdateUser

fix submitter updating (2)
This commit is contained in:
Emanuel Schütze 2019-02-13 13:23:07 +01:00 committed by GitHub
commit adc4cc0ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -481,7 +481,7 @@ export class ViewMotion extends BaseAgendaViewModel implements Searchable {
* @param update potentially the changed agenda Item. Needs manual verification
*/
public updateUser(update: ViewUser): void {
if (this.motion.submitters && this.motion.submitters.findIndex(user => user.user_id === update.id)) {
if (this.motion.submitters && this.motion.submitters.find(user => user.user_id === update.id)) {
const userIndex = this.submitters.findIndex(user => user.id === update.id);
this.submitters[userIndex] = update;
}