Skip to content

Commit

Permalink
Fix: Table selector of 0 wasn't limiting the API to just the first …
Browse files Browse the repository at this point in the history
…table when using `tables()`

- Error was the loose type checking on the selector
- https://datatables.net/forums/discussion/61468
- Thanks Kevin!
  • Loading branch information
AllanJard committed Apr 13, 2020
1 parent 8578050 commit e78cdf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/api/api.table.js
Expand Up @@ -45,7 +45,7 @@ var __table_selector = function ( selector, a )
*/
_api_register( 'tables()', function ( selector ) {
// A new instance is created if there was a selector specified
return selector ?
return selector !== undefined && selector !== null ?
new _Api( __table_selector( selector, this.context ) ) :
this;
} );
Expand Down

0 comments on commit e78cdf5

Please sign in to comment.