Return object instead of null from mock single() to avoid spread errors

cgen-c16ce148051f49a397aa0953934fffb6
This commit is contained in:
Builder.io 2025-09-27 20:56:46 +00:00
parent d35c4bbeea
commit b1021f0b1b

View file

@ -144,7 +144,7 @@ export const supabase = new Proxy(supabaseClient || {}, {
eq: () => builder,
order: () => builder,
limit: () => builder,
single: async () => ({ data: rows[0] ?? null, error: null }),
single: async () => ({ data: rows[0] ?? {}, error: null }),
then: undefined, // prevent accidental Promise behavior
};
return builder;