[javascript] add safety belt in cubicwebSortValueExtraction for cases where cubicweb:sortvalue is not available
--- a/web/data/jquery.tablesorter.js Fri Jan 09 09:18:16 2009 +0100
+++ b/web/data/jquery.tablesorter.js Fri Jan 09 11:01:34 2009 +0100
@@ -864,7 +864,11 @@
function cubicwebSortValueExtraction(node){
- return jQuery(node).attr('cubicweb:sortvalue');
+ var sortvalue = jQuery(node).attr('cubicweb:sortvalue');
+ if (sortvalue === undefined) {
+ return '';
+ }
+ return sortvalue;
}
Sortable.sortTables = function() {