Skip to content

Commit

Permalink
handle question marks in query string
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jul 19, 2021
1 parent 05fefef commit 19cf649
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/kit/src/runtime/server/page/load_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ export async function load_node({
};
}

const [path, search] = url.split('?');
const resolved = resolve(request.path, path);
const resolved = resolve(request.path, url.split('?')[0]);

let response;

Expand Down Expand Up @@ -133,6 +132,8 @@ export async function load_node({
throw new Error('Request body must be a string');
}

const search = url.includes('?') ? url.slice(url.indexOf('?') + 1) : '';

const rendered = await respond(
{
host: request.host,
Expand Down

0 comments on commit 19cf649

Please sign in to comment.