diff --git a/Composer/packages/client/src/recoilModel/dispatchers/__tests__/navigation.test.tsx b/Composer/packages/client/src/recoilModel/dispatchers/__tests__/navigation.test.tsx index db5c04e1d7..b1d9633c4c 100644 --- a/Composer/packages/client/src/recoilModel/dispatchers/__tests__/navigation.test.tsx +++ b/Composer/packages/client/src/recoilModel/dispatchers/__tests__/navigation.test.tsx @@ -171,14 +171,6 @@ describe('navigation dispatcher', () => { expectNavTo(`/bot/${projectId}/dialogs/dialogId`); expect(mockConvertPathToUrl).toBeCalledWith(projectId, projectId, 'dialogId'); }); - - it("doesn't navigate to a destination where we already are", async () => { - mockCheckUrl.mockReturnValue(true); - await act(async () => { - await dispatcher.navTo(projectId, 'dialogId', 'trigger'); - }); - expect(mockNavigateTo).not.toBeCalled(); - }); }); describe('selectTo', () => { diff --git a/Composer/packages/client/src/recoilModel/dispatchers/navigation.ts b/Composer/packages/client/src/recoilModel/dispatchers/navigation.ts index 5d4ba44d91..27d93dcef8 100644 --- a/Composer/packages/client/src/recoilModel/dispatchers/navigation.ts +++ b/Composer/packages/client/src/recoilModel/dispatchers/navigation.ts @@ -45,14 +45,13 @@ export const navigationDispatcher = () => { const projectId = skillId ?? rootBotProjectId; - const designPageLocation = await snapshot.getPromise(designPageLocationState(projectId)); set(currentProjectIdState, projectId); const currentUri = trigger == null ? convertPathToUrl(rootBotProjectId, skillId, dialogId) : convertPathToUrl(rootBotProjectId, skillId, dialogId, `selected=triggers[${trigger}]`); - if (checkUrl(currentUri, rootBotProjectId, projectId, designPageLocation)) return; + set(designPageLocationState(projectId), { dialogId: dialogId ?? '', selected: trigger ?? '',