Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
eltigerchino committed Jan 23, 2025
1 parent 4fb32a5 commit 9934caa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
5 changes: 1 addition & 4 deletions packages/kit/src/exports/adapter/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
INVALIDATED_PARAM,
TRAILING_SLASH_PARAM
} from '../../runtime/shared.js';
import { INVALIDATED_PARAM, TRAILING_SLASH_PARAM } from '../../runtime/shared.js';
import { add_data_suffix, has_data_suffix, strip_data_suffix } from '../../utils/url.js';

/**
Expand Down
18 changes: 9 additions & 9 deletions packages/kit/src/runtime/server/respond.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ export async function respond(request, options, manifest, state) {
.map((node) => node === '1');
url.searchParams.delete(INVALIDATED_PARAM);
}

// reroute could alter the given URL, so we pass a copy

/** @type {string} */
let rerouted_path;
try {
rerouted_path = options.hooks.reroute({ url: new URL(url) }) ?? url.pathname;
} catch {
return text('Internal Server Error', {
status: 500
});
}
try {
// reroute could alter the given URL, so we pass a copy
rerouted_path = options.hooks.reroute({ url: new URL(url) }) ?? url.pathname;
} catch {
return text('Internal Server Error', {
status: 500
});
}

/** @type {string} */
let decoded;
Expand Down

0 comments on commit 9934caa

Please sign in to comment.