fixing bug which prevents from adding again a previously removed contact
This commit is contained in:
parent
37ab83bb3e
commit
10ea08b41d
1 changed files with 1 additions and 1 deletions
|
@ -65,8 +65,8 @@ ContactList.prototype.rmContact = function(name) {
|
|||
console.log('removing ' + name + 'from contacts');
|
||||
for (var i = this.lst.children.length - 1; i >= 0; --i) {
|
||||
if (this.lst.children[i].children[0].innerHTML === name) {
|
||||
console.log('deleted');
|
||||
this.lst.removeChild(this.lst.children[i]);
|
||||
delete this.contacts[name];
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue