@anker-in/shopify-react 0.1.1-beta.17 → 0.1.1-beta.18

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.js CHANGED
@@ -1514,8 +1514,29 @@ var useCartAttributes = ({
1514
1514
  [memberAttributes, functionAttributes, presellAttributes, weightAttributes, trackingAttributes]
1515
1515
  );
1516
1516
  const extraAttributesInCart = react.useMemo(() => {
1517
+ const commonAttributeKeys = [
1518
+ // member attributes
1519
+ "_token",
1520
+ "_member_type",
1521
+ "_user_type",
1522
+ "_is_login",
1523
+ "_login_user",
1524
+ // function attributes
1525
+ "_discounts_function_env",
1526
+ // presell attributes
1527
+ "_presale",
1528
+ // weight attributes
1529
+ "_weight",
1530
+ "_app_source_name",
1531
+ // tracking attributes
1532
+ "utm_params",
1533
+ // referral attributes
1534
+ "_invite_code",
1535
+ "_play_mode_id",
1536
+ "_popup"
1537
+ ];
1517
1538
  return cart?.customAttributes?.filter(
1518
- (item) => !commonAttributes.some((attr) => attr.key === item.key)
1539
+ (item) => !commonAttributeKeys.includes(item.key)
1519
1540
  ) || [];
1520
1541
  }, [cart]);
1521
1542
  return react.useMemo(