Skip to content

Commit

Permalink
fixed error with grid view display
Browse files Browse the repository at this point in the history
  • Loading branch information
ajolipa committed May 9, 2024
1 parent 6ae3c6c commit 06a343f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editioncrafter/src/component/ImageGridView.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ class ImageGridView extends React.Component {
componentDidMount() {
const { documentView } = this.props;
const folioID = documentView[this.props.side].iiifShortID;
const thumbs = this.generateThumbs(folioID, this.state.currentDoc ? this.props.document.folios.filter((folio) => (folio.doc_id === this.state.currentDoc)) : this.props.document.folios);
const thumbs = this.generateThumbs(folioID, this.props.document.variorum && this.state.currentDoc ? this.props.document.folios.filter((folio) => (folio.doc_id === this.state.currentDoc)) : this.props.document.folios);
console.log(thumbs);
console.log(this.props.document.folios);
const thumbCount = (thumbs.length > this.loadIncrement) ? this.loadIncrement : thumbs.length;
const visibleThumbs = thumbs.slice(0, thumbCount);
this.setState({ thumbs, visibleThumbs });
Expand Down

0 comments on commit 06a343f

Please sign in to comment.