Skip to content

Commit e33e03d

Browse files
committed
fix(ngTableController): handle null data array
Now the `$data` will be assigned an empty array whenever `getData` returns a null
1 parent be6fa19 commit e33e03d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/ngTableController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
$scope.$groups = newDatapage || [];
253253
$scope.$groups.visibleColumnCount = visibleColumns.length;
254254
} else {
255-
$scope.$data = newDatapage;
255+
$scope.$data = newDatapage || [];
256256
$scope.$data.visibleColumnCount = visibleColumns.length;
257257
}
258258
}

0 commit comments

Comments
 (0)