Skip to content

Commit 648d23a

Browse files
committed
Filtered the list of table header ids to be unique to prevent incorrect expected id during rowspan tests.
1 parent 4e9b9c0 commit 648d23a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

HTMLCS.Util.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,11 @@ _global.HTMLCS.util = function() {
11701170
}//end for
11711171

11721172
if (exp.length > 0) {
1173-
exp = ' ' + exp.sort().join(' ') + ' ';
1173+
// Sort and filter expected ids by unique value.
1174+
var filteredExp = exp.sort().filter(function(value, index, self) {
1175+
return self.indexOf(value) === index;
1176+
});
1177+
exp = ' ' + filteredExp.join(' ') + ' ';
11741178
exp = exp.replace(/\s+/g, ' ').replace(/(\w+\s)\1+/g, '$1').replace(/^\s*(.*?)\s*$/g, '$1');
11751179
cells.push({
11761180
cell: thisCell,

0 commit comments

Comments
 (0)