File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/qwik-city/src/runtime/src Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @builder.io/qwik-city ' : patch
3
+ ---
4
+
5
+ FIX: link/useNavigate query params don't override thrown redirect's in loader/middleware anymore.
Original file line number Diff line number Diff line change @@ -383,8 +383,7 @@ export const QwikCityProvider = component$<QwikCityProps>((props) => {
383
383
const pageModule = contentModules [ contentModules . length - 1 ] as PageModule ;
384
384
385
385
// Restore search params unless it's a redirect
386
- const isRedirect = navType === 'form' && ! isSamePath ( trackUrl , prevUrl ) ;
387
- if ( navigation . dest . search && ! isRedirect ) {
386
+ if ( navigation . dest . search && ! ! isSamePath ( trackUrl , prevUrl ) ) {
388
387
trackUrl . search = navigation . dest . search ;
389
388
}
390
389
@@ -430,7 +429,8 @@ export const QwikCityProvider = component$<QwikCityProps>((props) => {
430
429
( navigation . scroll &&
431
430
( ! navigation . forceReload || ! isSamePath ( trackUrl , prevUrl ) ) &&
432
431
( navType === 'link' || navType === 'popstate' ) ) ||
433
- isRedirect
432
+ // Action might have responded with a redirect.
433
+ ( navType === 'form' && ! isSamePath ( trackUrl , prevUrl ) )
434
434
) {
435
435
// Mark next DOM render to scroll.
436
436
( document as any ) . __q_scroll_restore__ = ( ) =>
You can’t perform that action at this time.
0 commit comments