Make sure selected argument is always a boolean.

This commit is contained in:
Jürg Lehni 2011-04-28 10:05:43 +01:00
parent a9ea10ca7f
commit d71450c0b1

View file

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