From 075ca1049ac136995210317d65c61a46547e39d4 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 25 Jan 2014 16:31:15 -0600 Subject: [PATCH] fix setItems keeping references to original arrays. --- lib/widget.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/widget.js b/lib/widget.js index 3e0ea52..d16ccd3 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -4221,10 +4221,11 @@ List.prototype.removeItem = function(child) { }; List.prototype.setItems = function(items) { - var i = 0 + var items = items.slice() , original = this.items.slice() , selected = this.selected - , sel = this.ritems[this.selected]; + , sel = this.ritems[this.selected] + , i = 0; this.select(0);