Can't delete partially initialized table
Can't delete partially initialized table
example: http://jsfiddle.net/jpobley/593y16tf/1/
In my application I am saving certain table state, like ordering and page length, so that I can reload the table with updated data whenever I wish.
Now, recently, the number of columns that are being returned in the data has changed, which means that when I initialize the DataTable I get an error if my state tries to order the table using a column index that is no longer available:
TypeError: Cannot read property 'aDataSort' of undefined
This was easy enough to fix; I now verify that the index saved in state still exists on the data.
However, I'm unable to recover from the error using a try...catch
and then create any more tables on the page because the DataTable instance from the first attempt is still hanging around and I get the following error:
TypeError: Cannot read property 'parentNode' of null
Is there any way to do a super destroy? Like, scorched earth, FTW??