ouisys-engine 2.1.71 → 2.1.72

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.
@@ -26,16 +26,18 @@ var getHost = function getHost(_ref) {
26
26
  exports.getHost = getHost;
27
27
 
28
28
  var setOnLoadUtilities = function setOnLoadUtilities(config) {
29
- if (process.env.country.toLowerCase() === "cz") {
30
- (0, _utils.getGoogleReCaptchaConfig)(config);
31
- }
32
-
33
- if (process.env.country.toLowerCase() === "a2" && process.env.NODE_ENV === "production") {
34
- (0, _utils2.startEvinaAgency)(config);
35
- }
36
-
37
- if (process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq") {
38
- (0, _utils3.loadMcpShield)(window, config);
29
+ if (typeof window != "undefined") {
30
+ if (process.env.country.toLowerCase() === "cz") {
31
+ (0, _utils.getGoogleReCaptchaConfig)(config);
32
+ }
33
+
34
+ if (process.env.country.toLowerCase() === "a2" && process.env.NODE_ENV === "production") {
35
+ (0, _utils2.startEvinaAgency)(config);
36
+ }
37
+
38
+ if (process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq") {
39
+ (0, _utils3.loadMcpShield)(window, config);
40
+ }
39
41
  }
40
42
  };
41
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ouisys-engine",
3
- "version": "2.1.71",
3
+ "version": "2.1.72",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": "dist dev-tools",
@@ -13,13 +13,15 @@ export const getHost = ({host}:{host: string}): string=>{
13
13
  }
14
14
 
15
15
  export const setOnLoadUtilities = (config:IConfig)=>{
16
- if(process.env.country.toLowerCase() === "cz"){
17
- getGoogleReCaptchaConfig(config)
18
- }
19
- if(process.env.country.toLowerCase() === "a2" && process.env.NODE_ENV === "production"){
20
- startEvinaAgency(config)
21
- }
22
- if(process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq"){
23
- loadMcpShield(window, config);
16
+ if(typeof window != "undefined"){
17
+ if(process.env.country.toLowerCase() === "cz"){
18
+ getGoogleReCaptchaConfig(config)
19
+ }
20
+ if(process.env.country.toLowerCase() === "a2" && process.env.NODE_ENV === "production"){
21
+ startEvinaAgency(config)
22
+ }
23
+ if(process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq"){
24
+ loadMcpShield(window, config);
25
+ }
24
26
  }
25
27
  }