Commit 6f9b7fc 1 parent 2bc51dd commit 6f9b7fc Copy full SHA for 6f9b7fc
File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
3
- import { isPayPalDomain } from "@paypal/sdk-client/src" ;
3
+ import { isPayPalDomain , getEnv } from "@paypal/sdk-client/src" ;
4
4
// eslint-disable-next-line import/no-namespace
5
5
import * as postRobotModule from "@krakenjs/post-robot/src" ;
6
+ import { ENV } from "@paypal/sdk-constants/src" ;
6
7
7
8
import {
8
9
getThreeDomainSecureComponent ,
@@ -23,8 +24,18 @@ function protectedExport<T>(xport: T): ?T {
23
24
}
24
25
}
25
26
27
+ // $FlowIssue
28
+ export const devEnvOnlyExport = ( unprotectedExport ) => {
29
+ const env = getEnv ( ) ;
30
+ if ( env === ENV . LOCAL || env === ENV . STAGE ) {
31
+ return unprotectedExport ;
32
+ } else {
33
+ return undefined ;
34
+ }
35
+ } ;
36
+
26
37
export const ThreeDomainSecure : LazyProtectedExport < TDSComponent > = {
27
- __get__ : ( ) => protectedExport ( getThreeDomainSecureComponent ( ) ) ,
38
+ __get__ : ( ) => devEnvOnlyExport ( getThreeDomainSecureComponent ( ) ) ,
28
39
} ;
29
40
30
41
export const postRobot : LazyProtectedExport < typeof postRobotModule > = {
You can’t perform that action at this time.
0 commit comments