var card = function (val) {
console.log('loading profiles');
if(val == 4){
cards = [];
}
try {
$scope.ajaxRequest = A.Game.get({action: 'game',id: user.id});
$scope.ajaxRequest.$promise.then(function(){
if ($scope.ajaxRequest.game != 'error') {
$scope.ajaxRequest.game.forEach(function(entry) {
if(cards.indexOf(entry) !== -1) {
console.log('alredy in game');
} else {
if(entry.id != user.id){
cards.push(entry);
$scope.imageLocations.push(entry.photo);
}
}
});
bu kodda
TypeError: Cannot read properties of undefined (reading 'forEach') hatası alıyorum.
hata üstüne tıkladıgımda
$scope.ajaxRequest.game.forEach(function(entry) {
bolumu acılıyor ücretli ücretsiz yardım arıyorum