From d71450c0b1797becd959bb52998bdb4627990197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 28 Apr 2011 10:05:43 +0100 Subject: [PATCH] Make sure selected argument is always a boolean. --- src/item/Item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item/Item.js b/src/item/Item.js index 7b3e90b2..913715a0 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -60,7 +60,7 @@ var Item = this.Item = Base.extend({ child.setSelected(selected); } } else { - if (selected != this._selected) { + if ((selected = !!selected) != this._selected) { // TODO: when an item is removed or moved to another // document, it needs to be removed from _selectedItems this._selected = selected;