Bug in the butoons extension (v1.2.0) ?
Bug in the butoons extension (v1.2.0) ?
Hi there,
I am using datatables together with the button extension and run into an issue when I call destroy() on the table.
Firefox throws: TypeError: buttons[i] is undefined
When I check the source code I find in the destroy function the following code:
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
this.remove( buttons[i].node );
}
Should the code not be:
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
this.remove( buttons[0].node );
}
Since I remove one of the buttons object every time I call this.remove at some point the index "i" will be larger than the remaining object length throwing the error as mentioned above.
Just my thoughts but could you please check this? (for me the destroy() is running fine after I changed the source code).
Thanks
Yogi
Answers
Yes - it was fixed in 1.2.1 :-). 1.2.2 is the current release of Buttons.
Allan
Sorry, did not check for the latest version...
Thanks for the feedback
Yogi