From c9782126aa8b4b21691c5191edf953292f463249 Mon Sep 17 00:00:00 2001 From: Lu Han <32191031+luhan2017@users.noreply.github.com> Date: Fri, 23 Apr 2021 18:31:46 +0800 Subject: [PATCH 1/3] Fix dummy skill issue --- .../packages/client/src/pages/design/exportSkillModal/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Composer/packages/client/src/pages/design/exportSkillModal/index.tsx b/Composer/packages/client/src/pages/design/exportSkillModal/index.tsx index 5efb3939d9..9b9857f8b3 100644 --- a/Composer/packages/client/src/pages/design/exportSkillModal/index.tsx +++ b/Composer/packages/client/src/pages/design/exportSkillModal/index.tsx @@ -62,7 +62,7 @@ const ExportSkillModal: React.FC = ({ onSubmit, onDismiss const { buttons = [], content: Content, editJson, helpLink, subText, title, validate } = editorSteps[editorStep]; const settings = useRecoilValue(settingsState(projectId)); - const rootBotProjectId = useRecoilValue(rootBotProjectIdSelector) || ''; + const rootBotProjectId = useRecoilValue(rootBotProjectIdSelector) || projectId; const mergedSettings = mergePropertiesManagedByRootBot(projectId, rootBotProjectId, settings); const { skillConfiguration, runtime, runtimeSettings, publishTargets } = mergedSettings; const { setSettings } = useRecoilValue(dispatcherState); From 63815c89f8885fb56e598640e93e346a8b9b1232 Mon Sep 17 00:00:00 2001 From: Long Alan Date: Mon, 26 Apr 2021 16:10:27 +0800 Subject: [PATCH 2/3] dummy skill --- .../recoilModel/dispatchers/botProjectFile.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Composer/packages/client/src/recoilModel/dispatchers/botProjectFile.ts b/Composer/packages/client/src/recoilModel/dispatchers/botProjectFile.ts index 65a4369d3f..d99e9363f6 100644 --- a/Composer/packages/client/src/recoilModel/dispatchers/botProjectFile.ts +++ b/Composer/packages/client/src/recoilModel/dispatchers/botProjectFile.ts @@ -115,13 +115,15 @@ export const botProjectFileDispatcher = () => { const skillNameIdentifier = await snapshot.getPromise(botNameIdentifierState(skillProjectId)); set(botProjectFileState(rootBotProjectId), (current: BotProjectFile) => { const result = produce(current, (draftState) => { - if (!manifestId) { - delete draftState.content.skills[skillNameIdentifier].manifest; - } else { - draftState.content.skills[skillNameIdentifier] = { - ...draftState.content.skills[skillNameIdentifier], - manifest: manifestId, - }; + if (skillNameIdentifier) { + if (!manifestId) { + delete draftState.content.skills[skillNameIdentifier].manifest; + } else { + draftState.content.skills[skillNameIdentifier] = { + ...draftState.content.skills[skillNameIdentifier], + manifest: manifestId, + }; + } } }); return result; From 9862360620e1e82b13e6ff0ab89209b9d1b9d7bf Mon Sep 17 00:00:00 2001 From: Long Alan Date: Mon, 26 Apr 2021 16:11:30 +0800 Subject: [PATCH 3/3] revert --- .../packages/client/src/pages/design/exportSkillModal/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Composer/packages/client/src/pages/design/exportSkillModal/index.tsx b/Composer/packages/client/src/pages/design/exportSkillModal/index.tsx index 9b9857f8b3..5efb3939d9 100644 --- a/Composer/packages/client/src/pages/design/exportSkillModal/index.tsx +++ b/Composer/packages/client/src/pages/design/exportSkillModal/index.tsx @@ -62,7 +62,7 @@ const ExportSkillModal: React.FC = ({ onSubmit, onDismiss const { buttons = [], content: Content, editJson, helpLink, subText, title, validate } = editorSteps[editorStep]; const settings = useRecoilValue(settingsState(projectId)); - const rootBotProjectId = useRecoilValue(rootBotProjectIdSelector) || projectId; + const rootBotProjectId = useRecoilValue(rootBotProjectIdSelector) || ''; const mergedSettings = mergePropertiesManagedByRootBot(projectId, rootBotProjectId, settings); const { skillConfiguration, runtime, runtimeSettings, publishTargets } = mergedSettings; const { setSettings } = useRecoilValue(dispatcherState);