From: Chocobozzz Date: Tue, 23 Aug 2016 16:09:21 +0000 (+0200) Subject: Client: fix friend add input control when removing an input X-Git-Tag: v0.0.1-alpha~755 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f84a89f0e7e9595d2b6f6dd59181c01f562a4239;p=oweals%2Fpeertube.git Client: fix friend add input control when removing an input --- diff --git a/client/src/app/admin/friends/friend-add/friend-add.component.ts b/client/src/app/admin/friends/friend-add/friend-add.component.ts index 16cfd8a3a..2b2aceb8a 100644 --- a/client/src/app/admin/friends/friend-add/friend-add.component.ts +++ b/client/src/app/admin/friends/friend-add/friend-add.component.ts @@ -56,6 +56,8 @@ export class FriendAddComponent implements OnInit { } removeField(index: number) { + // Remove the last control + this.friendAddForm.removeControl(`url-${this.urls.length - 1}`); this.urls.splice(index, 1); }