bosia 1.1.0 → 1.1.1
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/package.json
CHANGED
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
settleScroll();
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
+
// A prefetch saved before an invalidation holds pre-mutation data — after a
|
|
149
|
+
// `use:enhance` success or `invalidate*()` it must not stand in for the refetch.
|
|
150
|
+
const invalidated = currentTick !== lastTick || appState.dirty.all;
|
|
148
151
|
lastTick = currentTick;
|
|
149
152
|
|
|
150
153
|
// Only a real navigation drops the action result. An invalidation re-run
|
|
@@ -217,7 +220,7 @@
|
|
|
217
220
|
|
|
218
221
|
// Load components + data in parallel, then update state atomically
|
|
219
222
|
// to avoid a flash of stale/empty data before the fetch completes.
|
|
220
|
-
const cached = match.route.hasServerData ? consumePrefetch(path) : null;
|
|
223
|
+
const cached = match.route.hasServerData && !invalidated ? consumePrefetch(path) : null;
|
|
221
224
|
prefetchCache.clear(); // clear remaining entries on navigation — matches SvelteKit behavior
|
|
222
225
|
// Forward cached parent data for skipped layers so downstream loaders see
|
|
223
226
|
// real parent() data, not {}. POST only when there's something to carry —
|