@anker-in/shopify-react 0.1.1-beta.12 → 0.1.1-beta.13

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.
package/dist/index.mjs CHANGED
@@ -2662,9 +2662,9 @@ function useUpdateCartDeliveryOptions(mutate, metafieldIdentifiers, options) {
2662
2662
  // src/hooks/member/plus/use-update-plus-member-delivery-options.ts
2663
2663
  var useUpdatePlusMemberDeliveryOptions = ({
2664
2664
  options
2665
- }) => {
2665
+ } = {}) => {
2666
2666
  const { cart: cartContextData, mutateCart, metafieldIdentifiers } = useCartContext();
2667
- const { trigger: updateCartDeliveryOptions2, isMutating } = useUpdateCartDeliveryOptions(
2667
+ const { trigger: updateCartDeliveryOptions2 } = useUpdateCartDeliveryOptions(
2668
2668
  mutateCart,
2669
2669
  metafieldIdentifiers
2670
2670
  );
@@ -2674,11 +2674,13 @@ var useUpdatePlusMemberDeliveryOptions = ({
2674
2674
  const { deliveryData } = arg;
2675
2675
  const firstDeliveryGroup = currentCart?.deliveryGroups?.[0];
2676
2676
  const deliveryGroupId = firstDeliveryGroup?.id;
2677
- const selectedOptionCode = deliveryData?.deliveryCustomData?.selected_delivery_option?.code;
2677
+ const selectedOptionCode = deliveryData?.deliveryCustomData?.selected_delivery_option;
2678
2678
  if (!deliveryGroupId || !selectedOptionCode || selectedOptionCode === firstDeliveryGroup?.selectedDeliveryOption?.code) {
2679
2679
  return null;
2680
2680
  }
2681
- const deliveryGroup = currentCart?.deliveryGroups?.find((group) => group?.id === deliveryGroupId);
2681
+ const deliveryGroup = currentCart?.deliveryGroups?.find(
2682
+ (group) => group?.id === deliveryGroupId
2683
+ );
2682
2684
  const matchedOption = deliveryGroup?.deliveryOptions?.find(
2683
2685
  (option) => option?.code === selectedOptionCode
2684
2686
  );
@@ -3117,7 +3119,7 @@ function CartProvider({
3117
3119
  useRequest(
3118
3120
  () => {
3119
3121
  const newAttributes = [...attributes, ...customAttributes];
3120
- const needUpdate = cart && !checkAttributesUpdateNeeded(
3122
+ const needUpdate = cart && checkAttributesUpdateNeeded(
3121
3123
  cart.customAttributes,
3122
3124
  newAttributes,
3123
3125
  customAttributesNeedDelete