aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Login.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Login.js')
-rw-r--r--vnext/src/ui/Login.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/src/ui/Login.js b/vnext/src/ui/Login.js
index 5d9908cb..ed0e990c 100644
--- a/vnext/src/ui/Login.js
+++ b/vnext/src/ui/Login.js
@@ -23,8 +23,8 @@ function Login({ onAuth }) {
const navigate = useNavigate()
const [visitor] = useVisitor()
useEffect(() => {
- if (visitor.hash) {
- const {retpath } = location.state || '/'
+ if (visitor && visitor.hash) {
+ const retpath = location.state?.retpath || '/'
console.log(retpath)
navigate(retpath)
}