@paypal/checkout-components 5.0.427 → 5.0.428

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypal/checkout-components",
3
- "version": "5.0.427",
3
+ "version": "5.0.428",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -231,16 +231,16 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
231
231
  },
232
232
 
233
233
  attributes: ({ props }) => {
234
- let fundingSource = "";
235
- if (props.fundingSource) {
236
- fundingSource = `-${props.fundingSource}`;
237
- }
234
+ // avoid title colliding when no fundingSource is set
235
+ const title = props.fundingSource
236
+ ? `${FUNDING_BRAND_LABEL.PAYPAL}-${props.fundingSource}`
237
+ : `${FUNDING_BRAND_LABEL.PAYPAL} Payment Buttons`;
238
238
 
239
239
  return {
240
240
  iframe: {
241
241
  allowpaymentrequest: "allowpaymentrequest",
242
242
  scrolling: "no",
243
- title: `${FUNDING_BRAND_LABEL.PAYPAL}${fundingSource}`,
243
+ title,
244
244
  role: "presentation",
245
245
  },
246
246
  };