Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardlyhel committed Apr 26, 2024
1 parent ac4755d commit c454057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hydrogen/src/analytics-manager/CartAnalytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ export function CartAnalytics({
}),
);

const previousCartLines = flattenConnection(prevCart?.lines);
const currentCartLines = flattenConnection(cart.lines);
const previousCartLines = prevCart?.lines ? flattenConnection(prevCart?.lines) : [];
const currentCartLines = cart.lines ? flattenConnection(cart.lines) : [];

// Detect quantity changes and missing cart lines
previousCartLines?.forEach((prevLine) => {
Expand Down

0 comments on commit c454057

Please sign in to comment.