From 8aa92f9efb2a33b8b2ea82f84b586fb848f67181 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Mon, 18 Jan 2010 02:56:17 +0000 Subject: [PATCH] calendar MDL-21355 Fixed bug when using undock all button after undocking an individual block --- lib/javascript-static.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 = [];