You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this error when I click on the column to sort:
stupidtable.min.js: 3 Uncaught TypeError: Cannot read property 'string' of undefined
at k.fn.init.c.fn.stupidsort (stupidtable.min.js: 3)
at HTMLTableCellElement. (stupidtable.min.js: 1)
at HTMLDivElement.dispatch (jquery-3.4.1.min.js: 2)
at HTMLDivElement.v.handle (jquery-3.4.1.min.js: 2)
The text was updated successfully, but these errors were encountered:
I had the same error popping up. It seems to be coming from var diff = sort_info.compare_fn(e1.columns[th_index], e2.columns[th_index]);
when either e1[index] or e2[index] doesn't exist.
In my particular case, it stemmed from a table that had a 'short' row. Ie:
H1 H2 H3
A1 B1 C1
A2 B2
A3 B3 C3
A4 B4 C4
Note the missing cell C2. Sorting on H3, it'd try to read the string from the nonexistant C2, making the sort function fail due to an undefined string as argument e1[index].
Normally, this likely indicates an issue with the table, not the sort. However, the sort should be able to handle this; I'd suggest that var diff needs to first check that both e1[index] and e2[index] actually exist before trying to sort them.
I have this error when I click on the column to sort:
stupidtable.min.js: 3 Uncaught TypeError: Cannot read property 'string' of undefined
at k.fn.init.c.fn.stupidsort (stupidtable.min.js: 3)
at HTMLTableCellElement. (stupidtable.min.js: 1)
at HTMLDivElement.dispatch (jquery-3.4.1.min.js: 2)
at HTMLDivElement.v.handle (jquery-3.4.1.min.js: 2)
The text was updated successfully, but these errors were encountered: