Skip to content

Commit

Permalink
fix: Empty setting for recognizer configuration when switch bot (micr…
Browse files Browse the repository at this point in the history
…osoft#7302)

* fix: Empty setting for recognizer configuration when switch bot

* update the naming
  • Loading branch information
lei9444 authored Apr 23, 2021
1 parent d61fbd8 commit 18fe971
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Composer/packages/client/src/recoilModel/Recognizers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import { crossTrainConfigState, filePersistenceState, settingsState } from './at
import { dialogsSelectorFamily, luFilesSelectorFamily, qnaFilesSelectorFamily } from './selectors';
import { recognizersSelectorFamily } from './selectors/recognizers';

const isAnyFileNotParsed = (files: { isContentUnparsed: boolean }[]) => {
return files.some((file) => file.isContentUnparsed);
};

export const LuisRecognizerTemplate = (target: string, fileName: string) => ({
$kind: SDKKinds.LuisRecognizer,
id: `LUIS_${target}`,
Expand Down Expand Up @@ -205,6 +209,7 @@ export const Recognizer = React.memo((props: { projectId: string }) => {

useEffect(() => {
if (isEmpty(filePersistence)) return;
if (isAnyFileNotParsed(luFiles) || isAnyFileNotParsed(qnaFiles)) return;
let recognizers: RecognizerFile[] = [];

dialogs
Expand Down

0 comments on commit 18fe971

Please sign in to comment.