Skip to content

Commit

Permalink
chore: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikg committed Feb 11, 2022
1 parent 2b397cc commit 44c7e06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/kit/src/runtime/server/page/load_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ export async function load_node({
if (!opts.body || typeof opts.body === 'string') {
// the json constructed below is later added to the dom in a script tag
// make sure the used values are safe
const statusNumber = Number(response.status);
if (isNaN(statusNumber)) {
const status_number = Number(response.status);
if (isNaN(status_number)) {
throw new Error(
`response.status is not a number. value: "${
response.status
Expand All @@ -267,7 +267,7 @@ export async function load_node({
fetched.push({
url: requested,
body: /** @type {string} */ (opts.body),
json: `{"status":${statusNumber},"statusText":${s(response.statusText)},"headers":${s(headers)},"body":${escape_json_in_html(body)}}`
json: `{"status":${status_number},"statusText":${s(response.statusText)},"headers":${s(headers)},"body":${escape_json_in_html(body)}}`
});
}

Expand Down

0 comments on commit 44c7e06

Please sign in to comment.