Skip to content

Commit

Permalink
[Enhancement kbss-cvut#520] Fix vocabulary content history not showin…
Browse files Browse the repository at this point in the history
…g pagination in activity tab when no records are available
  • Loading branch information
lukaskabc committed Nov 4, 2024
1 parent fa1b65e commit 670f032
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/component/vocabulary/TermChangeFrequencyUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const TermChangeFrequencyUI: React.FC<TermChangeFrequencyUIProps> = ({
});
}, [filterAuthor, filterTerm, filterType, filterAttribute]);

if (!aggregatedRecords || !changeRecords) {
if (!aggregatedRecords) {
return <div className="additional-metadata-container">&nbsp;</div>;
}

Expand Down Expand Up @@ -239,7 +239,7 @@ const TermChangeFrequencyUI: React.FC<TermChangeFrequencyUIProps> = ({
</tr>
</thead>
<tbody>
{changeRecords.map((r) => {
{changeRecords?.map((r) => {
if (r instanceof PersistRecord) {
return <VocabularyContentPersistRow key={r.iri} record={r} />;
}
Expand All @@ -254,7 +254,7 @@ const TermChangeFrequencyUI: React.FC<TermChangeFrequencyUIProps> = ({
</tbody>
</Table>
</div>
<If expression={changeRecords.length > 0}>
<If expression={(changeRecords?.length || 1) > 0}>
<SimplePagination
page={page}
setPage={setPage}
Expand Down

0 comments on commit 670f032

Please sign in to comment.