mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
Fix "get_key_index" to fit caller's expectations
The clients of "get_key_index" expect index of key in matching case otherwise -1. But instead of this function returns the "undefined" value. Fixes: https://pagure.io/freeipa/issue/7678 Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
parent
6175672e8e
commit
c3f23da49d
@ -125,7 +125,11 @@ jQuery.ordered_map = jQuery.fn.ordered_map = function(map) {
|
||||
};
|
||||
|
||||
that.get_key_index = function(key) {
|
||||
return that._key_indicies[key];
|
||||
var index = that._key_indicies[key];
|
||||
if (index !== undefined) {
|
||||
return index;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
that.get_key_by_index = function(index) {
|
||||
|
Loading…
Reference in New Issue
Block a user