Skip to content

Commit

Permalink
fix(ngTableController): handle null data array
Browse files Browse the repository at this point in the history
Now the `$data` will be assigned an empty array whenever `getData` returns a null
  • Loading branch information
ccrowhurstram committed Nov 10, 2015
1 parent be6fa19 commit e33e03d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/ngTableController.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
$scope.$groups = newDatapage || [];
$scope.$groups.visibleColumnCount = visibleColumns.length;
} else {
$scope.$data = newDatapage;
$scope.$data = newDatapage || [];
$scope.$data.visibleColumnCount = visibleColumns.length;
}
}
Expand Down

0 comments on commit e33e03d

Please sign in to comment.