Fixed : error when column contains only a input element (checkbox)

This commit is contained in:
sparkyx 2022-03-08 09:21:09 +01:00
parent d0a55c9fe0
commit 032bd0f338

View file

@ -277,8 +277,8 @@ var sorttable = {
hasInputs = (typeof node.getElementsByTagName == 'function') &&
node.getElementsByTagName('input').length;
if (node.getAttribute("sorttable_customkey") != null) {
if (node.getAttribute && node.getAttribute("sorttable_customkey") != null) {
return node.getAttribute("sorttable_customkey");
} else if (typeof node.textContent != 'undefined' && !hasInputs) {
return node.textContent.replace(/^\s+|\s+$/g, '');