Skip to content

Commit

Permalink
fix: check match items cannot iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsweet committed Sep 12, 2024
1 parent ff25db9 commit 9322b62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config-ui/src/api/scope-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const transform2deployments = (
deploymentPattern: string;
productionPattern: string;
} & Pagination,
): Promise<{ total: number; data: ITransform2deployments[] }> =>
): Promise<{ total: number; data: ITransform2deployments[] } | null> =>
request(`/plugins/${plugin}/connections/${connectionId}/transform-to-deployments`, {
method: 'post',
data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export const CheckMatchedItems = ({ plugin, connectionId, transformation }: Prop
pageSize: 10,
});

dispatch({ type: 'APPEND', payload: res.data });
dispatch({ type: 'APPEND', payload: res ? res.data : [] });

setPage(page + 1);
setTotal(res.total);
setTotal(res?.total ?? 0);
setLoading(false);
};

Expand Down

0 comments on commit 9322b62

Please sign in to comment.