Skip to content

Commit b1d9a38

Browse files
committed
Don't error if the table doesn't have a head
1 parent 25aba21 commit b1d9a38

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

coffee/sortable.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sortable =
1414
sortable.initTable table for table in tables
1515

1616
initTable: (table) ->
17-
return if table.tHead.rows.length isnt 1
17+
return if table.tHead?.rows.length isnt 1
1818
return if table.getAttribute('data-sortable-initialized') is 'true'
1919

2020
table.setAttribute 'data-sortable-initialized', 'true'

js/sortable.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/sortable.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)