From 16ab40461967546ea8c9619389ddd1b2ed7ca2b8 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 22 May 2012 17:34:25 +0200 Subject: [PATCH] fix map() in OptionGroup --- source/Ox.UI/js/Form/Ox.OptionGroup.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Form/Ox.OptionGroup.js b/source/Ox.UI/js/Form/Ox.OptionGroup.js index 71ed2fa0..e36bab1b 100644 --- a/source/Ox.UI/js/Form/Ox.OptionGroup.js +++ b/source/Ox.UI/js/Form/Ox.OptionGroup.js @@ -109,8 +109,10 @@ Ox.OptionGroup = function(items, min, max, property) { value get value @*/ this.value = function() { - var value = Ox.map(items, function(item) { - return item[property] ? item.id : null; + var value = items.filter(function(item) { + return item[property]; + }).function(item) { + return item.id; }); return max == 1 ? (value.length ? value[0] : '') : value; };