@lookiero/checkout 12.1.0 → 12.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -34,7 +34,7 @@ const CheckoutMiddleware = ({ customerId, onNotAccessible, loader = React.create
|
|
|
34
34
|
const feedbackRouteMatchRef = useRef(feedbackRouteMatch);
|
|
35
35
|
feedbackRouteMatchRef.current = feedbackRouteMatch;
|
|
36
36
|
const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
37
|
-
const checkoutItemsRef = useRef(
|
|
37
|
+
const checkoutItemsRef = useRef(undefined);
|
|
38
38
|
/* This hook is mounted at this level, although not being used directly, for optimization (regarding cache) */
|
|
39
39
|
useViewIsSizeChangeEnabledByCheckoutId({ checkoutId: checkout?.id });
|
|
40
40
|
const [startCheckout] = useStartCheckout({ checkoutId: checkout?.id, logger });
|
|
@@ -55,9 +55,7 @@ const CheckoutMiddleware = ({ customerId, onNotAccessible, loader = React.create
|
|
|
55
55
|
*/
|
|
56
56
|
const itemWithoutCustomerDecision = checkout?.items.find((item) => item.status === CheckoutItemStatus.INITIAL &&
|
|
57
57
|
checkoutItemsRef.current?.find((previousItem) => previousItem.id === item.id && previousItem.status !== CheckoutItemStatus.INITIAL)) || checkout?.items.find((item) => item.status === CheckoutItemStatus.INITIAL);
|
|
58
|
-
|
|
59
|
-
checkoutItemsRef.current = checkout.items;
|
|
60
|
-
}
|
|
58
|
+
checkoutItemsRef.current = checkout?.items;
|
|
61
59
|
/* Navigate to the summary if required */
|
|
62
60
|
if (itemWithoutCustomerDecision === undefined &&
|
|
63
61
|
!(summaryRouteMatchRef.current ||
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "12.1.
|
|
1
|
+
export declare const VERSION = "12.1.1";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "12.1.
|
|
1
|
+
export const VERSION = "12.1.1";
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ const CheckoutMiddleware: FC<CheckoutMiddlewareProps> = ({
|
|
|
50
50
|
feedbackRouteMatchRef.current = feedbackRouteMatch;
|
|
51
51
|
|
|
52
52
|
const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
53
|
-
const checkoutItemsRef = useRef<CheckoutItemProjection[]>(
|
|
53
|
+
const checkoutItemsRef = useRef<CheckoutItemProjection[] | undefined>(undefined);
|
|
54
54
|
|
|
55
55
|
/* This hook is mounted at this level, although not being used directly, for optimization (regarding cache) */
|
|
56
56
|
useViewIsSizeChangeEnabledByCheckoutId({ checkoutId: checkout?.id });
|
|
@@ -84,9 +84,7 @@ const CheckoutMiddleware: FC<CheckoutMiddlewareProps> = ({
|
|
|
84
84
|
),
|
|
85
85
|
) || checkout?.items.find((item) => item.status === CheckoutItemStatus.INITIAL);
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
checkoutItemsRef.current = checkout.items;
|
|
89
|
-
}
|
|
87
|
+
checkoutItemsRef.current = checkout?.items;
|
|
90
88
|
|
|
91
89
|
/* Navigate to the summary if required */
|
|
92
90
|
if (
|