Skip to content

Commit f94c14e

Browse files
committed
fix
1 parent 06f5c3a commit f94c14e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

js/install.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
var options = INSTALL_OPTIONS;
33

44
Array.prototype.forEach.call(document.querySelectorAll('table'), function(table){
5+
var firstTBodyRow, tHead;
6+
57
try {
68
// If there’s no tHead but the first tBody row contains ths, create a tHead and move that row into it.
7-
if (!table.tHead && (var firstTBodyRow = table.tBodies[0].rows[0]).children[0].tagName === 'TH') {
8-
var tHead = document.createElement('thead');
9+
if (!table.tHead && (firstTBodyRow = table.tBodies[0].rows[0]).children[0].tagName === 'TH') {
10+
tHead = document.createElement('thead');
911
tHead.appendChild(firstTBodyRow);
1012
table.insertBefore(tHead, table.firstChild);
1113
}

0 commit comments

Comments
 (0)