Skip to content

Commit 1ebbc5c

Browse files
authored
Fix an error when there is no buttons config
Merge pull request DataTables#118 from tfermm/master
2 parents 8674dfb + 9697d81 commit 1ebbc5c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/dataTables.buttons.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ var _dtButtons = DataTable.ext.buttons;
4848
*/
4949
var Buttons = function( dt, config )
5050
{
51+
// If there is no config set it to an empty array
52+
if ( typeof( config ) === 'undefined' ) {
53+
config = {};
54+
}
55+
5156
// Allow a boolean true for defaults
5257
if ( config === true ) {
5358
config = {};

0 commit comments

Comments
 (0)