@jitsu/js 1.9.3-canary.798.20240508224448 → 1.9.3-canary.801.20240514214630

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/dist/jitsu.cjs.js CHANGED
@@ -1497,10 +1497,12 @@ function send(method, payload, jitsuConfig, instance, store) {
1497
1497
  console.warn(`[JITSU] ${payload.type} responded with list of ${responseJson.destinations.length} destinations. However, this code is running in server-to-server mode, so destinations will be ignored`, jitsuConfig.debug ? JSON.stringify(responseJson.destinations, null, 2) : undefined);
1498
1498
  }
1499
1499
  else {
1500
- if (jitsuConfig.debug) {
1501
- console.log(`[JITSU] Processing device destinations: `, JSON.stringify(responseJson.destinations, null, 2));
1500
+ if (typeof window !== "undefined") {
1501
+ if (jitsuConfig.debug) {
1502
+ console.log(`[JITSU] Processing device destinations: `, JSON.stringify(responseJson.destinations, null, 2));
1503
+ }
1504
+ return processDestinations(responseJson.destinations, method, adjustedPayload, !!jitsuConfig.debug, instance);
1502
1505
  }
1503
- return processDestinations(responseJson.destinations, method, adjustedPayload, !!jitsuConfig.debug, instance);
1504
1506
  }
1505
1507
  }
1506
1508
  return adjustedPayload;
package/dist/jitsu.es.js CHANGED
@@ -1495,10 +1495,12 @@ function send(method, payload, jitsuConfig, instance, store) {
1495
1495
  console.warn(`[JITSU] ${payload.type} responded with list of ${responseJson.destinations.length} destinations. However, this code is running in server-to-server mode, so destinations will be ignored`, jitsuConfig.debug ? JSON.stringify(responseJson.destinations, null, 2) : undefined);
1496
1496
  }
1497
1497
  else {
1498
- if (jitsuConfig.debug) {
1499
- console.log(`[JITSU] Processing device destinations: `, JSON.stringify(responseJson.destinations, null, 2));
1498
+ if (typeof window !== "undefined") {
1499
+ if (jitsuConfig.debug) {
1500
+ console.log(`[JITSU] Processing device destinations: `, JSON.stringify(responseJson.destinations, null, 2));
1501
+ }
1502
+ return processDestinations(responseJson.destinations, method, adjustedPayload, !!jitsuConfig.debug, instance);
1500
1503
  }
1501
- return processDestinations(responseJson.destinations, method, adjustedPayload, !!jitsuConfig.debug, instance);
1502
1504
  }
1503
1505
  }
1504
1506
  return adjustedPayload;
package/dist/web/p.js.txt CHANGED
@@ -1498,10 +1498,12 @@
1498
1498
  console.warn(`[JITSU] ${payload.type} responded with list of ${responseJson.destinations.length} destinations. However, this code is running in server-to-server mode, so destinations will be ignored`, jitsuConfig.debug ? JSON.stringify(responseJson.destinations, null, 2) : undefined);
1499
1499
  }
1500
1500
  else {
1501
- if (jitsuConfig.debug) {
1502
- console.log(`[JITSU] Processing device destinations: `, JSON.stringify(responseJson.destinations, null, 2));
1501
+ if (typeof window !== "undefined") {
1502
+ if (jitsuConfig.debug) {
1503
+ console.log(`[JITSU] Processing device destinations: `, JSON.stringify(responseJson.destinations, null, 2));
1504
+ }
1505
+ return processDestinations(responseJson.destinations, method, adjustedPayload, !!jitsuConfig.debug, instance);
1503
1506
  }
1504
- return processDestinations(responseJson.destinations, method, adjustedPayload, !!jitsuConfig.debug, instance);
1505
1507
  }
1506
1508
  }
1507
1509
  return adjustedPayload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jitsu/js",
3
- "version": "1.9.3-canary.798.20240508224448",
3
+ "version": "1.9.3-canary.801.20240514214630",
4
4
  "description": "",
5
5
  "author": "Jitsu Dev Team <dev@jitsu.com>",
6
6
  "main": "dist/jitsu.cjs.js",
@@ -34,8 +34,8 @@
34
34
  "rollup": "^3.2.5",
35
35
  "ts-jest": "29.0.5",
36
36
  "typescript": "^5.3.3",
37
- "@jitsu/protocols": "1.9.3-canary.798.20240508224448",
38
- "jsondiffpatch": "1.9.3-canary.798.20240508224448"
37
+ "jsondiffpatch": "1.9.3-canary.801.20240514214630",
38
+ "@jitsu/protocols": "1.9.3-canary.801.20240514214630"
39
39
  },
40
40
  "dependencies": {
41
41
  "analytics": "0.8.9"
@@ -610,10 +610,12 @@ async function send(
610
610
  jitsuConfig.debug ? JSON.stringify(responseJson.destinations, null, 2) : undefined
611
611
  );
612
612
  } else {
613
- if (jitsuConfig.debug) {
614
- console.log(`[JITSU] Processing device destinations: `, JSON.stringify(responseJson.destinations, null, 2));
613
+ if (typeof window !== "undefined") {
614
+ if (jitsuConfig.debug) {
615
+ console.log(`[JITSU] Processing device destinations: `, JSON.stringify(responseJson.destinations, null, 2));
616
+ }
617
+ return processDestinations(responseJson.destinations, method, adjustedPayload, !!jitsuConfig.debug, instance);
615
618
  }
616
- return processDestinations(responseJson.destinations, method, adjustedPayload, !!jitsuConfig.debug, instance);
617
619
  }
618
620
  }
619
621
  return adjustedPayload;