Skip to content

Commit

Permalink
quick fix for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Solorio committed Nov 16, 2021
1 parent 28defb1 commit 39be1b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/assets/v2/js/grants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,13 @@ if (document.getElementById('grants-showcase')) {
if (!append_mode) {
vm.grants = [];
}

const previouslyLoadedIds = vm.grants.map(grant => grant.id);

getGrants.grants.forEach(function(item) {
vm.grants.push(item);
if (!previouslyLoadedIds.includes(item.id)) {
vm.grants.push(item);
}
});

vm.fetchedPages = [ ...vm.fetchedPages, Number(vm.params.page) ];
Expand Down

0 comments on commit 39be1b1

Please sign in to comment.