diff --git a/src/state/useAfterInitHook.ts b/src/state/useAfterInitHook.ts index 46ae130c0d..83cbf23748 100644 --- a/src/state/useAfterInitHook.ts +++ b/src/state/useAfterInitHook.ts @@ -59,7 +59,12 @@ export function useAfterInitHook(handledKubeconfigId: KubeconfigIdHandleState) { initDone.current = true; const previousPath = getPreviousPath(); - if (previousPath) { + + if ( + previousPath && + previousPath.startsWith('/') && + !previousPath.startsWith('//') + ) { navigate(previousPath); removePreviousPath(); } else {