aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/elgglib.js4
-rw-r--r--js/lib/hooks.js2
2 files changed, 3 insertions, 3 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;
};
/**
diff --git a/js/lib/hooks.js b/js/lib/hooks.js
index 7bac471f6..5e1808e22 100644
--- a/js/lib/hooks.js
+++ b/js/lib/hooks.js
@@ -115,7 +115,7 @@ elgg.trigger_hook = function(name, type, params, value) {
return true;
});
- return (tempReturnValue !== null) ? tempReturnValue : returnValue;
+ return (tempReturnValue != null) ? tempReturnValue : returnValue;
};
/**