Skip to content

Commit

Permalink
Add a comment on what cleanUrl is doing
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Jan 21, 2022
1 parent 838b486 commit adf3350
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/astro/vendor/vite/dist/client/client.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ function warnFailedFetch(err, path) {
socket.addEventListener('message', async ({ data }) => {
handleMessage(JSON.parse(data));
});

/**
* This cleans up the query params and removes the `direct` param which is internal.
* Other query params are preserved.
*/
function cleanUrl(pathname) {
let url = new URL(pathname, location);
url.searchParams.delete('direct');
Expand Down

0 comments on commit adf3350

Please sign in to comment.