@sveltejs/kit 1.0.0-next.385 → 1.0.0-next.386

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1672,6 +1672,13 @@ function create_client({ target, session, base, trailing_slash }) {
1672
1672
  }
1673
1673
  });
1674
1674
 
1675
+ // fix link[rel=icon], because browsers will occasionally try to load relative
1676
+ // URLs after a pushState/replaceState, resulting in a 404 — see
1677
+ // https://github.com/sveltejs/kit/issues/3748#issuecomment-1125980897
1678
+ for (const link of document.querySelectorAll('link')) {
1679
+ if (link.rel === 'icon') link.href = link.href;
1680
+ }
1681
+
1675
1682
  addEventListener('pageshow', (event) => {
1676
1683
  // If the user navigates to another site and then uses the back button and
1677
1684
  // bfcache hits, we need to set navigating to null, the site doesn't know
@@ -1410,20 +1410,15 @@ async function render_response({
1410
1410
  }
1411
1411
 
1412
1412
  const session = writable($session);
1413
+ // Even if $session isn't accessed, it still ends up serialized in the rendered HTML
1414
+ is_private = is_private || (cache?.private ?? (!!$session && Object.keys($session).length > 0));
1413
1415
 
1414
1416
  /** @type {Record<string, any>} */
1415
1417
  const props = {
1416
1418
  stores: {
1417
1419
  page: writable(null),
1418
1420
  navigating: writable(null),
1419
- /** @type {import('svelte/store').Writable<App.Session>} */
1420
- session: {
1421
- ...session,
1422
- subscribe: (fn) => {
1423
- is_private = cache?.private ?? true;
1424
- return session.subscribe(fn);
1425
- }
1426
- },
1421
+ session,
1427
1422
  updated
1428
1423
  },
1429
1424
  /** @type {import('types').Page} */
package/dist/cli.js CHANGED
@@ -18,7 +18,7 @@ function handle_error(e) {
18
18
  process.exit(1);
19
19
  }
20
20
 
21
- const prog = sade('svelte-kit').version('1.0.0-next.385');
21
+ const prog = sade('svelte-kit').version('1.0.0-next.386');
22
22
 
23
23
  prog
24
24
  .command('package')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.0.0-next.385",
3
+ "version": "1.0.0-next.386",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",