From fd77aad92c762413eaae8f97c99a26fedf6e5275 Mon Sep 17 00:00:00 2001
From: Melissa Autumn <melissa@thunderbird.net>
Date: Thu, 7 Dec 2023 11:41:25 -0800
Subject: [PATCH] Fix unauthorized login redirect

---
 frontend/src/App.vue | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 34462ca8f..3519ed9f2 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -85,10 +85,11 @@ const call = createFetch({
           data.detail?.message || 'Please re-connect with Google',
           url,
         );
-      } else if (error.statusCode === 401) {
+      } else if (response.status === 401) {
         // Clear current user data, and ship them to the login screen!
         await currentUser.reset();
-        router.push('/login');
+        await router.push('/login');
+        return;
       }
 
       // Pass the error along