I have the following code:
if (typeof $scope.grid.data == 'undefined') {
$scope.grid.data = [];
}
$scope.grid.data.push(result);
I put in the check for undefined but I am still getting an error message from the push saying:
TypeError: Cannot call method 'push' of null
Any advice would be much appreciated