From 10ea08b41d829a58eac7dbf62c666dad041dcc34 Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Tue, 27 Nov 2012 18:30:13 +0100 Subject: [PATCH] fixing bug which prevents from adding again a previously removed contact --- lib/contacts.nsui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/contacts.nsui.js b/lib/contacts.nsui.js index b10ff38..763f49e 100644 --- a/lib/contacts.nsui.js +++ b/lib/contacts.nsui.js @@ -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 ; } }