summaryrefslogtreecommitdiffstats
path: root/install/ui/jquery.ordered-map.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/jquery.ordered-map.js')
-rwxr-xr-xinstall/ui/jquery.ordered-map.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/install/ui/jquery.ordered-map.js b/install/ui/jquery.ordered-map.js
index aa0d28143..7c0f3fadc 100755
--- a/install/ui/jquery.ordered-map.js
+++ b/install/ui/jquery.ordered-map.js
@@ -36,10 +36,17 @@ jQuery.ordered_map = jQuery.fn.ordered_map = function() {
};
that.put = function(key, value) {
- that.keys.push(key);
- that.values.push(value);
+
+ var i = that.get_key_index(key);
+ if (i >= 0) {
+ that.values[i] = value;
+ } else {
+ that.keys.push(key);
+ that.values.push(value);
+ that.length = that.keys.length;
+ }
+
that.map[key] = value;
- that.length = that.keys.length;
};
that.remove = function(key) {