Fix supabase proxy to not mock database queries when configured
cgen-c1a3ddaf730745ff8dd4057dc69ebd1f
This commit is contained in:
parent
ff06e4600d
commit
76720abb34
1 changed files with 3 additions and 0 deletions
|
|
@ -129,6 +129,9 @@ export const supabase = new Proxy(supabaseClient || {}, {
|
|||
}
|
||||
|
||||
if (prop === 'from') {
|
||||
if (isSupabaseConfigured && target && typeof target.from === 'function') {
|
||||
return target.from.bind(target);
|
||||
}
|
||||
return (table: string) => ({
|
||||
select: () => ({ error: null, data: [] }),
|
||||
insert: () => ({ error: null, data: [] }),
|
||||
|
|
|
|||
Loading…
Reference in a new issue