diff --git a/documentation/docs/05-hooks.md b/documentation/docs/05-hooks.md index 7af8403d9ab4..31c9e583c0a1 100644 --- a/documentation/docs/05-hooks.md +++ b/documentation/docs/05-hooks.md @@ -14,7 +14,7 @@ This function runs every time the SvelteKit server receives a [request](/docs/we /// file: src/hooks.js /** @type {import('@sveltejs/kit').Handle} */ export async function handle({ event, resolve }) { - if (event.request.url.startsWith('/custom')) { + if (event.url.pathname.startsWith('/custom')) { return new Response('custom response'); }