fix: react-doctor async-defer-await 10→0 (move await below guards), rerender-memo-with-default-value 13→0 (module-scope EMPTY_* defaults)

This commit is contained in:
Nora
2026-06-26 06:42:08 -06:00
parent 38bd3fcbc7
commit 3d5988afd0
18 changed files with 69 additions and 25 deletions
+4 -2
View File
@@ -182,7 +182,8 @@ export async function mergeLocalCart(
userId: string
): Promise<{ merged: CartItem[] }> {
await getSession(); if (!localCart || localCart.length === 0) return { merged: [] };
if (!localCart || localCart.length === 0) return { merged: [] };
await getSession();
// Fetch server cart
let serverCart: CartItem[] = [];
@@ -282,7 +283,8 @@ export async function checkStopProductAvailability(
productIds: string[]
): Promise<ProductAvailability[]> {
await getSession(); if (!productIds || productIds.length === 0) return [];
if (!productIds || productIds.length === 0) return [];
await getSession();
const { rows } = await pool.query<{ check_stop_product_availability: ProductAvailability[] | null }>(
`SELECT check_stop_product_availability($1, $2::uuid[]) AS "check_stop_product_availability"`,
[stopId, productIds],