Skip to content

fix(loading): accept redirect records without a route location as data - #116

Merged
vincentkoc merged 1 commit into
mainfrom
fix/redirect-shaped-loader-data
Nov 20, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/redirect-shaped-loader-data

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

A loader returning an ordinary record with type equal to redirect could put the route in its error state, even when the record contained no redirect location.

User Impact

Consumers can return redirect records such as audit data. Throwing that same record still rejects navigation, and a valid redirect result still follows its destination.

Why This Change Was Made

Loading and navigation now share the guard for the public redirect shape. The exports and declared types are unchanged.

Evidence

The base rejected a returned redirect record with from and to fields. The focused public API check preserves the identity of returned records with either a missing location or a string location, and propagates the identical values when thrown.

@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 20, 2026 15:55
@vincentkoc
vincentkoc requested a review from a team as a code owner November 20, 2026 15:55
@vincentkoc
vincentkoc merged commit 63eb1a8 into main Nov 20, 2026
12 checks passed
@vincentkoc
vincentkoc deleted the fix/redirect-shaped-loader-data branch November 20, 2026 15:58
vincentkoc added a commit that referenced this pull request Nov 20, 2026
…ion-snapshots

* origin/main:
  refactor(tests): consolidate pending invalidation scenarios (#118)
  fix(loading): accept redirect records without a route location as data (#116)
  fix(loading): ignore a component import from before stop (#113)

# Conflicts:
#	test/router-invalidate-pending.test.ts
vincentkoc added a commit that referenced this pull request Nov 20, 2026
…replay

* origin/main:
  fix(history): replace the URL on an unmatched redirect (#115)
  refactor(tests): consolidate pending invalidation scenarios (#118)
  fix(loading): accept redirect records without a route location as data (#116)
  fix(loading): ignore a component import from before stop (#113)

# Conflicts:
#	CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant