Skip to content

Commit

Permalink
Fix bug where contributor list gets duplicated
Browse files Browse the repository at this point in the history
  • Loading branch information
futa-ikeda committed Apr 8, 2021
1 parent afbefb3 commit 7222a62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/preprints/provider/preprint-detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default Controller.extend({
userHasEnteredReview: false,
showWarning: false,
previousTransition: null,
authors: [],

hasTags: bool('preprint.tags.length'),
expandedAbstract: navigator.userAgent.includes('Prerender'),
Expand Down Expand Up @@ -173,10 +172,11 @@ export default Controller.extend({
{ include: ['node', 'license', 'review_actions'] },
).catch(() => this.replaceRoute('page-not-found'));

const contributors = this.get('authors');
const contributors = [];
loadAll(response, 'contributors', contributors, {
filter: { bibliographic: true },
});
this.set('authors', contributors);
this.set('preprint', response);
if (response.get('dateWithdrawn') !== null) {
this.set('isWithdrawn', true);
Expand Down

0 comments on commit 7222a62

Please sign in to comment.