From ced01e25eb10b7e293da8d7a9fd9f2365c3454eb Mon Sep 17 00:00:00 2001 From: Nimish Gautam Date: Fri, 18 Sep 2009 23:48:15 +0000 Subject: [PATCH] fixes bug #20708, where tables containing colspans greater than 1 are still sortable by the last column --- skins/common/wikibits.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 9887ef4f1f..06bbff3aec 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -695,6 +695,9 @@ function ts_resortTable(lnk) { var row = table.rows[j]; if((" "+row.className+" ").indexOf(" unsortable ") < 0) { var keyText = ts_getInnerText(row.cells[column]); + if(keyText == undefined) { + keyText = ""; + } var oldIndex = (reverse ? -j : j); var preprocessed = preprocessor( keyText.replace(/^[\s\xa0]+/, "").replace(/[\s\xa0]+$/, "") ); -- 2.20.1