Skip to content

Commit

Permalink
fix(ngTableController): fix regression in recent rename of ngTablePar…
Browse files Browse the repository at this point in the history
…mas to NgTableParams

The regression broke nested grids
  • Loading branch information
ccrowhurstram committed Jan 27, 2015
1 parent 4a344db commit c7f2ac8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scripts/04-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ function($scope, NgTableParams, $timeout, $parse, $compile, $attrs, $element, ng
$scope.$filterRow = {};
$scope.$loading = false;

if (!($scope.params instanceof NgTableParams)) {
// until such times as the directive uses an isolated scope, we need to ensure that the check for
// the params field only consults the "own properties" of the $scope. This is to avoid seeing the params
// field on a $scope higher up in the prototype chain
if (!$scope.hasOwnProperty("params")) {
$scope.params = new NgTableParams();
$scope.params.isNullInstance = true;
}
Expand Down

0 comments on commit c7f2ac8

Please sign in to comment.