fixing bug which prevents from adding again a previously removed contact

This commit is contained in:
Rodolphe Breard 2012-11-27 18:30:13 +01:00
parent 37ab83bb3e
commit 10ea08b41d

View file

@ -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 ;
}
}