@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.
- package/assets/client/start.js +7 -0
- package/assets/server/index.js +3 -8
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/assets/client/start.js
CHANGED
|
@@ -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
|
package/assets/server/index.js
CHANGED
|
@@ -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
|
-
|
|
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