Skip to content

Commit

Permalink
[docs] fix url bug in hooks example (#4643)
Browse files Browse the repository at this point in the history
  • Loading branch information
callumgare authored Apr 17, 2022
1 parent 7f50b59 commit d14e0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/docs/05-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit d14e0ac

Please sign in to comment.