Skip to content

Commit

Permalink
Fixes #36515 - Don't show promote out of order for in-order envs
Browse files Browse the repository at this point in the history
  • Loading branch information
sjha4 committed Jun 20, 2023
1 parent 7efc0cb commit aade35a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ const ContentViewVersionPromote = ({
);

const isValid = useCallback((env) => {
if (!env.prior) return true;
if (!env.prior || versionEnvironments.some(item => item.id === env.prior.id)) return true;
if (!isChecked(prior(env))) return false;
return isValid(prior(env));
}, [prior, isChecked]);
}, [prior, isChecked, versionEnvironments]);

useDeepCompareEffect(() => {
setForcePromote(userCheckedItems.filter(item => !isValid(item)));
Expand Down

0 comments on commit aade35a

Please sign in to comment.