Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

Commit

Permalink
v1.5.1, fixes #33
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobius1 committed Sep 25, 2017
1 parent 2e1916f commit 7ef0b21
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A lightweight, dependency-free javascript HTML table plugin. Similar to jQuery D
* moment.js integration for sorting columns with datetime strings (experimental, v1.2.3 and above)


[Documentation](https://github.com/Mobius1/Vanilla-DataTables/wiki) | [Latest Version](https://github.com/Mobius1/Vanilla-DataTables/releases/tag/1.5.0)
[Documentation](https://github.com/Mobius1/Vanilla-DataTables/wiki) | [Latest Version](https://github.com/Mobius1/Vanilla-DataTables/releases/tag/1.5.1)

---

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vanilla-datatables",
"version": "1.5.0",
"version": "1.5.1",
"main": "src/vanilla-dataTables.js",
"ignore": [
".gitattributes",
Expand Down
2 changes: 1 addition & 1 deletion dist/vanilla-dataTables.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/vanilla-dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vanilla-datatables",
"version": "1.5.0",
"version": "1.5.1",
"description": "A lightweight, dependency-free javascript HTML table plugin.",
"main": "src/vanilla-dataTables.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/vanilla-dataTables.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (c) 2015-2017 Karl Saunders (http://mobius.ovh)
* Licensed under MIT (http://www.opensource.org/licenses/mit-license.php)
*
* Version: 1.5.0
* Version: 1.5.1
*
*/

Expand Down
10 changes: 8 additions & 2 deletions src/vanilla-dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (c) 2015-2017 Karl Saunders (http://mobius.ovh)
* Licensed under MIT (http://www.opensource.org/licenses/mit-license.php)
*
* Version: 1.5.0
* Version: 1.5.1
*
*/
(function (root, factory) {
Expand Down Expand Up @@ -333,7 +333,7 @@
thead.appendChild(tr);
}

if (data.data) {
if (data.data && data.data.length) {
tbody = createElement("tbody");
each(data.data, function (rows) {
if (data.headings) {
Expand Down Expand Up @@ -895,6 +895,12 @@
dt.data.push(this.build(data));
}

// We may have added data to an empty table
if ( dt.data.length ) {
dt.hasRows = true;
}


this.update();

dt.columns().rebuild();
Expand Down

0 comments on commit 7ef0b21

Please sign in to comment.