Skip to content

Commit

Permalink
fix: Unable to open another bot (microsoft#3051)
Browse files Browse the repository at this point in the history
Co-authored-by: Andy Brown <asbrown002@gmail.com>
Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
  • Loading branch information
3 people authored May 14, 2020
1 parent d10a2e6 commit 0a807a0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Composer/packages/client/src/pages/design/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,16 @@ const getTabFromFragment = () => {

const DesignPage: React.FC<RouteComponentProps<{ dialogId: string; projectId: string }>> = props => {
const { state, actions } = useContext(StoreContext);
const { dialogs, displaySkillManifest, breadcrumb, visualEditorSelection, projectId, schemas, focusPath } = state;
const {
dialogs,
displaySkillManifest,
breadcrumb,
visualEditorSelection,
projectId,
schemas,
focusPath,
designPageLocation,
} = state;
const {
dismissManifestModal,
removeDialog,
Expand Down Expand Up @@ -122,10 +131,10 @@ const DesignPage: React.FC<RouteComponentProps<{ dialogId: string; projectId: st

useEffect(() => {
const index = currentDialog.triggers.findIndex(({ type }) => type === SDKKinds.OnBeginDialog);
if (index >= 0 && !location?.search) {
if (index >= 0 && !designPageLocation.selected) {
selectTo(createSelectedPath(index));
}
}, [currentDialog?.id, location]);
}, [currentDialog?.id, designPageLocation]);

useEffect(() => {
if (location && props.dialogId && props.projectId) {
Expand Down

0 comments on commit 0a807a0

Please sign in to comment.