Fix supabase proxy to not mock database queries when configured

cgen-c1a3ddaf730745ff8dd4057dc69ebd1f
This commit is contained in:
Builder.io 2025-09-27 00:36:41 +00:00
parent ff06e4600d
commit 76720abb34

View file

@ -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: [] }),