Skip to content

Commit 6f76c78

Browse files
feat(payment): PAYPAL-5717 Added AppSwitch to PPCP button strategy
1 parent 828b988 commit 6f76c78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/paypal-commerce-integration/src/paypal-commerce/paypal-commerce-button-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default class PayPalCommerceButtonStrategy implements CheckoutButtonStrat
9797
paypalcommerce: PayPalCommerceButtonInitializeOptions,
9898
): void {
9999
const { buyNowInitializeOptions, style, onComplete, onEligibilityFailure } = paypalcommerce;
100-
const userAgent = navigator.userAgent;
100+
const userAgent = navigator?.userAgent || '';
101101

102102
const paypalSdk = this.paypalCommerceIntegrationService.getPayPalSdkOrThrow();
103103
const state = this.paymentIntegrationService.getState();

0 commit comments

Comments
 (0)