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:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user