Skip to content

Commit

Permalink
Strengthen the check to prevent UI infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
taicchoumsft committed Nov 20, 2020
1 parent 8d8e5be commit 6c617ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Composer/packages/client/src/recoilModel/Recognizers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export const Recognizer = React.memo((props: { projectId: string }) => {
recognizers = [...recognizers, ...preserveRecognizer(qnaMakeRecognizers, curRecognizers)];
}
});
if (recognizers.length != curRecognizers.length) {
if (!isEqual([...recognizers].sort(), [...curRecognizers].sort())) {
setRecognizers(recognizers);
}
}, [dialogs, luFiles, qnaFiles]);
Expand Down

0 comments on commit 6c617ba

Please sign in to comment.