diff --git a/.changeset/shy-clocks-smoke.md b/.changeset/shy-clocks-smoke.md new file mode 100644 index 000000000000..2c881c85cd2c --- /dev/null +++ b/.changeset/shy-clocks-smoke.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +fix: discard preload fork before creating a new one diff --git a/packages/kit/src/runtime/client/client.js b/packages/kit/src/runtime/client/client.js index 673ff671270f..b04664ddc578 100644 --- a/packages/kit/src/runtime/client/client.js +++ b/packages/kit/src/runtime/client/client.js @@ -514,6 +514,8 @@ async function _preload_data(intent) { // then a later one is becoming the real navigation and the preload tokens // get out of sync. if (intent.id !== load_cache?.id) { + discard_load_cache(); + const preload = {}; preload_tokens.add(preload); load_cache = {