Skip to content

Commit

Permalink
Merge pull request #579 from lixinghua123/LLMM-lxh
Browse files Browse the repository at this point in the history
fix: LLMMulitWheel tool answer sort
  • Loading branch information
lihqi authored Oct 9, 2024
2 parents b15b1d6 + aa2e2d8 commit 56be87e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export const getSorts = ({
return true;
});
if (selecteds && selecteds?.length > 0) {
newSort = selecteds.map((i) => i.map((item) => modelList.find((j) => j.id === item)));
newSort = selecteds
.map((i) => i.map((item) => modelList.find((j) => j.id === item))?.filter((arr) => arr))
?.filter((arr) => arr?.length > 0);
}
return { waitSorts, newSort };
};
Expand Down Expand Up @@ -86,7 +88,7 @@ const ModelAnswerSort = (props: IProps, ref: any) => {
}, [modelData, imgIndex]);

useEffect(() => {
if (selectedSort) {
if (selectedSort && modelData.length > 0) {
setRenderAnswerSortData();
}
}, [modelData, imgIndex]);
Expand Down

0 comments on commit 56be87e

Please sign in to comment.