fix: resolve pending state when throwing notFound in beforeLoad#6654
fix: resolve pending state when throwing notFound in beforeLoad#6654schiller-manuel merged 1 commit intomainfrom
Conversation
📝 WalkthroughWalkthroughThis PR fixes a bug where throwing Changes
Sequence DiagramsequenceDiagram
participant Child as Child Route<br/>(beforeLoad)
participant Handler as Error Handler<br/>(load-matches)
participant Parent as Parent Route<br/>(pendingComponent)
participant Router as Router State
Child->>Child: Navigation triggered
Router->>Router: State → pending
Parent->>Parent: pendingComponent shown
Child->>Child: beforeLoad executes
Child->>Handler: notFound() thrown<br/>(routerCode: BEFORE_LOAD)
Handler->>Handler: Check: routerCode is BEFORE_LOAD<br/>and parentRoute exists?
Handler->>Handler: Skip invariant check<br/>(allow bubbling)
Handler->>Parent: Pass error up to parent
Parent->>Router: Render notFoundComponent
Router->>Router: State → idle, statusCode: 404
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
|
View your CI Pipeline Execution ↗ for commit 780ec44
☁️ Nx Cloud last updated this comment at |
fixes #6021
Summary by CodeRabbit
Bug Fixes
Tests