Skip to content

Commit

Permalink
Merge pull request #408 from Pitros/fix-likes
Browse files Browse the repository at this point in the history
Fixed likes on stream view
  • Loading branch information
weblancaster committed Oct 12, 2015
2 parents 09520f0 + 94ccbf9 commit 9a0e819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/public/js/common/SCapiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ app.service('SCapiService', function ($http, $window, $q, $log, $state, $statePa
return response.data.collection.concat(next_href_response.collection);
})
} else {
return response.data;
return response.data.collection;
}
} else {
// invalid response
Expand Down
2 changes: 1 addition & 1 deletion app/public/js/stream/streamCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ app.controller('StreamCtrl', function ($scope, SCapiService, $rootScope) {
var track = tracksData[i].origin;

if (track.hasOwnProperty('user_favorite'))
track.user_favorite = ($scope.likes.collection.indexOf(track.id) != -1);
track.user_favorite = ($scope.likes.indexOf(track.id) != -1);
}
}

Expand Down

0 comments on commit 9a0e819

Please sign in to comment.