Skip to content

Commit

Permalink
versions: display only active versions
Browse files Browse the repository at this point in the history
  • Loading branch information
anikachurilova committed Aug 14, 2024
1 parent e8746ef commit a6da902
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class RecordsResultsListItem extends Component {

const filters = currentQueryState && Object.fromEntries(currentQueryState.filters);
const allVersionsVisible = filters?.allversions;
const numOtherVersions = versions.index - 1;
const numOtherVersions = versions.versions_count - 1;

// Derivatives
const viewLink = `/records/${result.id}`;
Expand Down Expand Up @@ -140,7 +140,7 @@ class RecordsResultsListItem extends Component {
)}
</p>

{!allVersionsVisible && versions.index > 1 && (
{!allVersionsVisible && versions.versions_count > 1 && (
<p>
<b>
{i18next.t("{{count}} more versions exist for this record", {
Expand Down

0 comments on commit a6da902

Please sign in to comment.