From 3a7e6da44297087de52ced17ee970567a87edb85 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Wed, 13 Feb 2019 11:49:37 +0100 Subject: [PATCH] fix submitter updating --- client/src/app/site/motions/models/view-motion.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/src/app/site/motions/models/view-motion.ts b/client/src/app/site/motions/models/view-motion.ts index c8e9cded6..d14653663 100644 --- a/client/src/app/site/motions/models/view-motion.ts +++ b/client/src/app/site/motions/models/view-motion.ts @@ -483,11 +483,7 @@ export class ViewMotion extends BaseAgendaViewModel implements Searchable { public updateUser(update: ViewUser): void { if (this.motion.submitters && this.motion.submitters.findIndex(user => user.user_id === update.id)) { const userIndex = this.submitters.findIndex(user => user.id === update.id); - if (userIndex < 0) { - this.submitters.push(update); - } else { - this.submitters[userIndex] = update; - } + this.submitters[userIndex] = update; } if (this.motion.supporters_id && this.motion.supporters_id.includes(update.id)) { const userIndex = this.supporters.findIndex(user => user.id === update.id);