Fix onAuthStateChange in proxy
cgen-10faf35cf70944daacd95863cd6801f3
This commit is contained in:
parent
01bec84abb
commit
d524f128f1
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ export const supabase = new Proxy(supabaseClient || {}, {
|
|||
return await mockAuth.getSession();
|
||||
},
|
||||
onAuthStateChange: (callback: any) => {
|
||||
if (isSupabaseConfigured && target.auth) {
|
||||
if (isSupabaseConfigured && target && target.auth) {
|
||||
try {
|
||||
return target.auth.onAuthStateChange(callback);
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue