From 76720abb3405bed383f7f35d29fc75cc39f992cb Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 27 Sep 2025 00:36:41 +0000 Subject: [PATCH] Fix supabase proxy to not mock database queries when configured cgen-c1a3ddaf730745ff8dd4057dc69ebd1f --- client/lib/supabase.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/lib/supabase.ts b/client/lib/supabase.ts index c4af987c..5b06d849 100644 --- a/client/lib/supabase.ts +++ b/client/lib/supabase.ts @@ -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: [] }),