diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 71208e96663..4930b036e50 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1569,6 +1569,7 @@ blocks.dock = { return false; } this.items[uid].remove(); + delete this.items[uid]; this.fire('dock:itemremoved', uid); this.count--; if (this.count===0) { @@ -1588,7 +1589,7 @@ blocks.dock = { remove_all:function() { for (var i in this.items) { this.items[i].remove(); - this.items[i] = null; + delete this.items[i]; } Y.fire('dock:toberemoved'); this.items = [];