From 555526235eafeb5b6f0cfb6d4245c3e8e8a4b7dd Mon Sep 17 00:00:00 2001 From: DrJosepon Date: Sun, 27 Mar 2016 16:47:39 -0500 Subject: [PATCH] This fixes the problem with duplicated songs in the Likes area each time a person reaches the end of the scroll. --- app/public/js/favorites/favoritesCtrl.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/public/js/favorites/favoritesCtrl.js b/app/public/js/favorites/favoritesCtrl.js index 10466d7b..39808b6f 100644 --- a/app/public/js/favorites/favoritesCtrl.js +++ b/app/public/js/favorites/favoritesCtrl.js @@ -35,8 +35,9 @@ app.controller('FavoritesCtrl', function ( SCapiService.getNextPage() .then(function(data) { for ( var i = 0; i < data.collection.length; i++ ) { - $scope.originalData.push( data.collection[i] ); - $scope.data.push( data.collection[i] ) + // This makes the information repeat each time the data loads + // $scope.originalData.push( data.collection[i] ); + $scope.data.push( data.collection[i] ); } utilsService.updateTracksReposts(data.collection, true); }, function(error) {