# HG changeset patch # User Adrien Di Mascio # Date 1231495294 -3600 # Node ID 3c19343f28481dade72d80f6c73bc5bef85bd27b # Parent c0cd7398edff8a9723af08f6e523e8c9087eb8de [javascript] add safety belt in cubicwebSortValueExtraction for cases where cubicweb:sortvalue is not available diff -r c0cd7398edff -r 3c19343f2848 web/data/jquery.tablesorter.js --- 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() {