make sure to throw error if no user is logged in

This commit is contained in:
Blake Kaufman
2025-10-26 09:43:26 +01:00
parent 308a5f8818
commit 31b7073dfa
+1 -1
View File
@@ -93,7 +93,7 @@ const GlobalContextProvider = ({ children }) => {
);
if (!collectionData) throw new Error('No data returened');
setPreLoadedUserData({ isLoading: true, data: collectionData });
}
} else throw new Error('No user logged in');
} catch (err) {
console.log('Error preloading user data');
setPreLoadedUserData({ isLoading: false, data: null });