Skip to content

Commit

Permalink
fix(designer): Fix issue where next failure is disabled when there is…
Browse files Browse the repository at this point in the history
… only 1 failure (#4468)
  • Loading branch information
hartra344 committed Mar 27, 2024
1 parent e06ee13 commit 650f14d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libs/designer-ui/src/lib/pager/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export const Pager: React.FC<PagerProps> = ({
setCurrent(initialCurrent);
}, [initialCurrent]);

let failedMax = 0,
failedMin = 0;
let failedMax = 0;
let failedMin = 0;
let onClickNext: PageChangeEventHandler | undefined, onClickPrevious: PageChangeEventHandler | undefined;

if (failedIterationProps) {
Expand Down
2 changes: 1 addition & 1 deletion libs/designer/src/lib/ui/common/LoopsPager/LoopsPager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const LoopsPager = ({ metadata, scopeId, collapsed }: LoopsPagerProps) =>
const failedIterationProps =
failedRepetitions.length > 0
? {
max: failedRepetitions.length > 1 ? failedRepetitions[failedRepetitions.length - 1] + 1 : 0,
max: failedRepetitions.length >= 1 ? failedRepetitions[failedRepetitions.length - 1] + 1 : 0,
min: failedRepetitions[0] + 1 >= 1 ? failedRepetitions[0] + 1 : 1,
onClickNext: onClickNextFailed,
onClickPrevious: onClickPreviousFailed,
Expand Down

0 comments on commit 650f14d

Please sign in to comment.