coveo.analytics 2.22.2 → 2.22.3

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.
@@ -96,7 +96,7 @@ class Cookie {
96
96
  else {
97
97
  expires = '';
98
98
  }
99
- host = location.hostname;
99
+ host = window.location.hostname;
100
100
  if (host.indexOf('.') === -1) {
101
101
  document.cookie = name + '=' + value + expires + '; path=/';
102
102
  }
package/dist/library.js CHANGED
@@ -184,7 +184,7 @@ var Cookie = (function () {
184
184
  else {
185
185
  expires = '';
186
186
  }
187
- host = location.hostname;
187
+ host = window.location.hostname;
188
188
  if (host.indexOf('.') === -1) {
189
189
  document.cookie = name + '=' + value + expires + '; path=/';
190
190
  }
@@ -176,7 +176,7 @@ class Cookie {
176
176
  else {
177
177
  expires = '';
178
178
  }
179
- host = location.hostname;
179
+ host = window.location.hostname;
180
180
  if (host.indexOf('.') === -1) {
181
181
  document.cookie = name + '=' + value + expires + '; path=/';
182
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coveo.analytics",
3
- "version": "2.22.2",
3
+ "version": "2.22.3",
4
4
  "description": "📈 Coveo analytics client (node and browser compatible) ",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.es.js",
@@ -18,7 +18,7 @@ export class Cookie {
18
18
  expires = '';
19
19
  }
20
20
 
21
- host = location.hostname;
21
+ host = window.location.hostname;
22
22
  if (host.indexOf('.') === -1) {
23
23
  // no "." in a domain - it's localhost or something similar
24
24
  document.cookie = name + '=' + value + expires + '; path=/';