Skip to content

Commit

Permalink
fix: resolve issue with __PAYPAL_DOMAIN__ global (#159)
Browse files Browse the repository at this point in the history
move loggerUrl global reference inside getLogger function
  • Loading branch information
xuanwan05 authored Jun 21, 2023
1 parent 9a719af commit 87ef3fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { getPayPalLoggerUrl } from "./domains";

type GetLogger = () => LoggerType;

const disableSetCookieQuery = "disableSetCookie=true";
export const getLogger: GetLogger = memoize(() => {
const disableSetCookieQuery = "disableSetCookie=true";

const loggerUrl = getDisableSetCookie()
? `${getPayPalLoggerUrl()}?${disableSetCookieQuery}`
: getPayPalLoggerUrl();
const loggerUrl = getDisableSetCookie()
? `${getPayPalLoggerUrl()}?${disableSetCookieQuery}`
: getPayPalLoggerUrl();

export const getLogger: GetLogger = memoize(() => {
return Logger({
url: loggerUrl,
});
Expand Down

0 comments on commit 87ef3fb

Please sign in to comment.