From 01bec84abb439ba80d504d4d3483552a093b5287 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 17 Aug 2025 00:15:26 +0000 Subject: [PATCH] Improve other auth methods in proxy cgen-322a0a56df934064950e20a7a07ef977 --- client/lib/supabase.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/lib/supabase.ts b/client/lib/supabase.ts index f1ceb7c6..8d712ceb 100644 --- a/client/lib/supabase.ts +++ b/client/lib/supabase.ts @@ -70,7 +70,7 @@ export const supabase = new Proxy(supabaseClient || {}, { } }, signOut: async () => { - if (isSupabaseConfigured && target.auth) { + if (isSupabaseConfigured && target && target.auth) { try { return await target.auth.signOut(); } catch (error) { @@ -80,7 +80,7 @@ export const supabase = new Proxy(supabaseClient || {}, { return await mockAuth.signOut(); }, getUser: async () => { - if (isSupabaseConfigured && target.auth) { + if (isSupabaseConfigured && target && target.auth) { try { return await target.auth.getUser(); } catch (error) { @@ -90,7 +90,7 @@ export const supabase = new Proxy(supabaseClient || {}, { return await mockAuth.getUser(); }, getSession: async () => { - if (isSupabaseConfigured && target.auth) { + if (isSupabaseConfigured && target && target.auth) { try { return await target.auth.getSession(); } catch (error) {