Fix sort error for streams with names that are numeric

The jQuery .data() documentation says: "Every attempt is made to
convert the string to a JavaScript value (this includes booleans,
numbers, objects, arrays, and null) otherwise it is left as a
string. To retrieve the value's attribute as a string without any
attempt to convert it, use the attr() method."

(imported from commit f47c1cbb94cb5a98ea9842b00f45c35cd21873f9)
This commit is contained in:
Zev Benjamin
2013-03-11 12:06:49 -04:00
parent bf2ad720c8
commit 9c28e52f91

View File

@@ -907,7 +907,7 @@ function sort_narrow_list() {
var items = $('#stream_filters li').get();
var parent = $('#stream_filters');
items.sort(function(a,b){
return $(a).data('name').localeCompare($(b).data('name'));
return $(a).attr('data-name').localeCompare($(b).attr('data-name'));
});
parent.empty();