Skip to content
Merged

v3.11.0 #1149

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(docs): correctly redirect when auth does not exist in the routing…
… example doc

Co-Authored-By: Jonathan Porta <[email protected]>
  • Loading branch information
Scott Prue and JonathanPorta committed Nov 23, 2021
commit 45afefb1422d04a12d1ae50fef60f95bbd884405
2 changes: 1 addition & 1 deletion docs/recipes/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ProtectedPage extends Component {
}

componentWillReceiveProps({ authExists }) {
if (authExists) {
if (!authExists) {
this.context.router.push('/login') // redirect to /login if not authed
}
}
Expand Down