diff --git a/packages/next/client/router.ts b/packages/next/client/router.ts index 14664a831f37b..dbcd11a9b2d62 100644 --- a/packages/next/client/router.ts +++ b/packages/next/client/router.ts @@ -130,7 +130,7 @@ export default singletonRouter as SingletonRouter export { default as withRouter } from './with-router' export function useRouter(throwOnMissing: true): NextRouter -export function useRouter(): NextRouter | null +export function useRouter(): NextRouter export function useRouter(throwOnMissing?: boolean) { const router = React.useContext(RouterContext) if (!router && throwOnMissing) {