diff --git a/frontend/src/scenes/insights/insightSceneLogic.tsx b/frontend/src/scenes/insights/insightSceneLogic.tsx index 67634b200c7a4..ad5eff574651d 100644 --- a/frontend/src/scenes/insights/insightSceneLogic.tsx +++ b/frontend/src/scenes/insights/insightSceneLogic.tsx @@ -303,8 +303,10 @@ export const insightSceneLogic = kea([ return false } - // If just the hash changes, don't show the prompt - if (router.values.currentLocation.pathname === newLocation?.pathname) { + // If just the hash or project part changes, don't show the prompt + const currentPathname = router.values.currentLocation.pathname.replace(/\/project\/\d+/, '') + const newPathname = newLocation?.pathname.replace(/\/project\/\d+/, '') + if (currentPathname === newPathname) { return false }