From f84a89f0e7e9595d2b6f6dd59181c01f562a4239 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 23 Aug 2016 18:09:21 +0200 Subject: [PATCH] Client: fix friend add input control when removing an input --- client/src/app/admin/friends/friend-add/friend-add.component.ts | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.25.1