Skip to content

Commit 5f23565

Browse files
committed
get_route_id is a misnomer
1 parent d386a96 commit 5f23565

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/kit/src/runtime/client/client.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ async function load_route({ id, invalidating, url, params, route, preload }) {
875875

876876
/** @type {import('types').ServerNodesResponse | import('types').ServerRedirectNode | null} */
877877
let server_data = null;
878-
const url_changed = current.url ? id !== get_route_id(current.url) : false;
878+
const url_changed = current.url ? id !== get_page_key(current.url) : false;
879879
const route_changed = current.route ? route.id !== current.route.id : false;
880880
const search_params_changed = diff_search_params(current.url, url);
881881

@@ -1200,7 +1200,7 @@ function get_navigation_intent(url, invalidating) {
12001200
const params = route.exec(path);
12011201

12021202
if (params) {
1203-
const id = get_route_id(url);
1203+
const id = get_page_key(url);
12041204
/** @type {import('./types.js').NavigationIntent} */
12051205
const intent = {
12061206
id,
@@ -1220,7 +1220,7 @@ function get_url_path(url) {
12201220
}
12211221

12221222
/** @param {URL} url */
1223-
function get_route_id(url) {
1223+
function get_page_key(url) {
12241224
return url.pathname + url.search;
12251225
}
12261226

@@ -1579,7 +1579,7 @@ function setup_preload() {
15791579
const options = get_router_options(a);
15801580

15811581
// we don't want to preload data for a page we're already on
1582-
const same_url = url && get_route_id(current.url) === get_route_id(url);
1582+
const same_url = url && get_page_key(current.url) === get_page_key(url);
15831583

15841584
if (!options.reload && !same_url) {
15851585
if (priority <= options.preload_data) {

0 commit comments

Comments
 (0)