diff --git a/app/client/src/ce/sagas/NavigationSagas.ts b/app/client/src/ce/sagas/NavigationSagas.ts index 6bf02fbea8..88d84e26a4 100644 --- a/app/client/src/ce/sagas/NavigationSagas.ts +++ b/app/client/src/ce/sagas/NavigationSagas.ts @@ -38,12 +38,14 @@ export function* handleRouteChange( yield fork(watchForTrackableUrl, action.payload); const IDEType = getIDETypeByUrl(pathname); - yield fork( - FocusRetention.onRouteChange.bind(FocusRetention), - pathname, - previousPath, - state, - ); + if (previousPath) { + yield fork( + FocusRetention.onRouteChange.bind(FocusRetention), + pathname, + previousPath, + state, + ); + } if (IDEType === IDE_TYPE.App) { yield fork(logNavigationAnalytics, action.payload);