Closed andrewgonzales closed 4 years ago
I re-added the check, but with items.length instead of items. If a table has two or more header rows and no body rows, the early return for that.table.rows.length < 2
won't catch, so this check prevents unnecessary sortTable code from running, as intended, but is actually reachable.
My install works fine with my local machine node 6/npm 3, but fails when I set nvm to node v0.10 like in the Travis CI build.
Stale. Please re-open a new pull request if this is still an issue and include a test!
The items variable is instantiated as an array in sortTable, so it will always be truthy, and
!items
on line 170 of tablesort.js will never evaluate. This update removes the extraneous check and clarifies the code.