Skip to content

Commit

Permalink
Add additional condition to ensure active router versions are display…
Browse files Browse the repository at this point in the history
…ed before current ones
  • Loading branch information
deadlycoconuts committed Jul 18, 2023
1 parent 63acfa3 commit 58f9cf5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export const ListRouterVersionsForEnsemblerTable = ({
useEffect(() => {
if (results.activeItems.length > 0){
setEnsemblerUsedByActiveRouterVersion(true)
// If there is an active router version using this ensembler, it is definitely also a current router version using
// this ensembler
setEnsemblerUsedByCurrentRouterVersion(true)
} else {
if (currentRouterVersion.isLoaded && !currentRouterVersion.error) {
if (currentRouterVersion.data.length > 0){
Expand Down Expand Up @@ -115,7 +118,7 @@ export const ListRouterVersionsForEnsemblerTable = ({
</EuiCallOut>
) : (
<Fragment>
{ensemblerUsedByCurrentRouterVersion ? (
{(ensemblerUsedByCurrentRouterVersion && results.totalActiveCount === 0) ? (
currentRouterVersion.data.length > 0 && (
<div>
<br/>
Expand Down

0 comments on commit 58f9cf5

Please sign in to comment.