Skip to content

Commit

Permalink
Fix for self.data undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Heys committed Jun 16, 2016
1 parent 7bf203b commit 43942ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/ng-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@
currentPages = newPages;
ngTableEventsChannel.publishPagesChanged(this, newPages, oldPages);

if (self.data.length === 0 && self.total() > 0) {
if (self.data && self.data.length === 0 && self.total() > 0) {
self.page(self.page() - 1);
}
}
Expand Down

0 comments on commit 43942ad

Please sign in to comment.