Client: fix friend add input control when removing an input
authorChocobozzz <florian.bigard@gmail.com>
Tue, 23 Aug 2016 16:09:21 +0000 (18:09 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Tue, 23 Aug 2016 16:09:21 +0000 (18:09 +0200)
client/src/app/admin/friends/friend-add/friend-add.component.ts

index 16cfd8a3ab959f64ed247a2f78609d228c40e9d9..2b2aceb8ab95a65814b2b785f145d91bf290d9f2 100644 (file)
@@ -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);
   }