From 81c15659f26d17e5f72c00feb3bf04397d69b7cf Mon Sep 17 00:00:00 2001 From: Simon Prins Date: Wed, 25 Sep 2024 15:04:06 +0200 Subject: [PATCH] Update reference to resolveHref --- src/lib/cache-tags.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/cache-tags.ts b/src/lib/cache-tags.ts index 21bbd5b..28da195 100644 --- a/src/lib/cache-tags.ts +++ b/src/lib/cache-tags.ts @@ -1,6 +1,6 @@ import type * as Next from 'next' import Router from 'next/router' -import { resolveHref } from 'next/dist/shared/lib/router/router' +import { resolveHref } from 'next/dist/client/resolve-href' import { get } from './stack' import type { CacheTagsRegistry } from './registry/type' @@ -103,8 +103,7 @@ class CacheTags { if (!pathname) { throw new Error('Could not resolve page pathname') } - - return resolveHref(Router, { pathname, query: ctx.params }, true)[1] + return resolveHref(Router, { href: pathname, query: ctx.params })[1] } /**