diff options
Diffstat (limited to 'js/lib/elgglib.js')
-rw-r--r-- | js/lib/elgglib.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/lib/elgglib.js b/js/lib/elgglib.js index 628adccfc..85251c1e8 100644 --- a/js/lib/elgglib.js +++ b/js/lib/elgglib.js @@ -467,7 +467,7 @@ elgg.parse_url = function(url, component, expand) { } } return results; -} +}; /** * Returns an object with key/values of the parsed query string. @@ -535,12 +535,12 @@ 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); } return false; -} +}; /** * Tests if object[parent] contains child @@ -553,8 +553,8 @@ 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; +}; /** * Triggers the init hook when the library is ready @@ -569,4 +569,4 @@ elgg.initWhenReady = function() { elgg.trigger_hook('init', 'system'); elgg.trigger_hook('ready', 'system'); } -}
\ No newline at end of file +};
\ No newline at end of file |