Skip to content

Commit

Permalink
create_url_proxy -> create_prerendering_url_proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jan 13, 2022
1 parent 8f141ae commit 47ea3a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/kit/src/runtime/server/page/load_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { respond } from '../index.js';
import { s } from '../../../utils/misc.js';
import { escape_json_string_in_html } from '../../../utils/escape.js';
import { is_root_relative, resolve } from '../../../utils/url.js';
import { create_url_proxy } from './utils.js';
import { create_prerendering_url_proxy } from './utils.js';

/**
* @param {{
Expand Down Expand Up @@ -59,7 +59,7 @@ export async function load_node({
if (module.load) {
/** @type {import('types/page').LoadInput | import('types/page').ErrorLoadInput} */
const load_input = {
url: state.prerender ? create_url_proxy(url) : url,
url: state.prerender ? create_prerendering_url_proxy(url) : url,
params,
get session() {
uses_credentials = true;
Expand Down
4 changes: 2 additions & 2 deletions packages/kit/src/runtime/server/page/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { coalesce_to_error } from '../../../utils/error.js';
import { hash } from '../../hash.js';
import { escape_html_attr } from '../../../utils/escape.js';
import { s } from '../../../utils/misc.js';
import { create_url_proxy } from './utils.js';
import { create_prerendering_url_proxy } from './utils.js';

// TODO rename this function/module

Expand Down Expand Up @@ -77,7 +77,7 @@ export async function render_response({
session
},
page: {
url: state.prerender ? create_url_proxy(url) : url,
url: state.prerender ? create_prerendering_url_proxy(url) : url,
params,
status,
error,
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/server/page/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @param {URL} url */
export function create_url_proxy(url) {
export function create_prerendering_url_proxy(url) {
return new Proxy(url, {
get: (target, prop, receiver) => {
if (prop === 'search' || prop === 'searchParams') {
Expand Down

0 comments on commit 47ea3a0

Please sign in to comment.