HtmlTable method: empty fails on empty table #1051

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

Calling myTable.empty(); on an already empty HtmlTable you get this error

Uncaught TypeError: Cannot call method 'isDisplayed' of undefined

tracked it to the selectRange function for loop

for (var i = startRow; i <= endRow; i++){
            if (this.options.selectHiddenRows || rows[i].isDisplayed()) this[method](rows[i], true);
        }

This commit addresses the issue...

All the best
Daniel

jfly commented on 9d8e68d Dec 16, 2011

I'm not sure this is the best fix for the problem. We should avoid having i be out of range in the first place. See #1081.

Member

SergioCrisostomo commented Jun 20, 2014

This has already been fixed by f55c257.

Sorry we didn't close this before.
Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment