Skip to content

Commit

Permalink
Minor bugfixes
Browse files Browse the repository at this point in the history
* addresses inveniosoftware#172
* DocumentAuthors component raising exception
* "checkout" button in loan requests not disabled during loading
  • Loading branch information
FlorianCassayre committed Sep 1, 2020
1 parent 3bb92c7 commit 2b139d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/lib/modules/Document/DocumentAuthors.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,13 @@ class DocumentAuthors extends Component {
} = this.props;
const { isExpanded } = this.state;

let displayedAuthors = authors;
const allAuthors = authors ? authors : [];
let displayedAuthors = allAuthors;
if (!isExpanded) {
displayedAuthors = authors.slice(0, limit);
displayedAuthors = allAuthors.slice(0, limit);
}

const isShowingAllAuthors = displayedAuthors.length === authors.length;
const isShowingAllAuthors = displayedAuthors.length === allAuthors.length;
const showAllAuthorsCmp =
!isShowingAllAuthors && expandable ? (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export default class ItemPendingLoans extends Component {
) ||
!invenioConfig.ITEMS.canCirculateStatuses.includes(
itemDetails.metadata.status
)
) ||
isPendingLoansLoading
}
onClick={() =>
performCheckoutAction(
Expand Down

0 comments on commit 2b139d9

Please sign in to comment.