diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/lib/elgglib.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/lib/elgglib.js b/js/lib/elgglib.js index d963a62be..85251c1e8 100644 --- a/js/lib/elgglib.js +++ b/js/lib/elgglib.js @@ -535,7 +535,7 @@ elgg.push_to_object_array = function(object, parent, value) { object[parent] = [] } - if (object[parent].indexOf(value) < 0) { + if ($.inArray(value, object[parent]) < 0) { return object[parent].push(value); } @@ -553,7 +553,7 @@ elgg.is_in_object_array = function(object, parent, value) { elgg.assertTypeOf('object', object); elgg.assertTypeOf('string', parent); - return typeof(object[parent]) != 'undefined' && object[parent].indexOf(value) >= 0; + return typeof(object[parent]) != 'undefined' && $.inArray(value, object[parent]) >= 0; }; /** |