@rebuy/rebuy 1.3.6 → 1.3.7

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/cookie.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { dataToString, stringToData, isBase64Encoded } from './utilities.js';
2
2
 
3
3
  export function get(name) {
4
- if (typeof document == 'undefined') {
4
+ if (typeof document == 'undefined' || !document.cookie) {
5
5
  return null;
6
6
  }
7
7
 
@@ -49,7 +49,7 @@ export function getAll() {
49
49
  }
50
50
 
51
51
  export function set(name, value, config) {
52
- if (typeof document == 'undefined') {
52
+ if (typeof document == 'undefined' || !document.cookie) {
53
53
  return null;
54
54
  }
55
55
 
package/geolocation.js CHANGED
@@ -35,7 +35,7 @@ const getGeolocation = async () => {
35
35
 
36
36
  export class Geolocation {
37
37
  constructor(key) {
38
- if (typeof document == 'undefined') {
38
+ if (typeof document == 'undefined' || !document.cookie) {
39
39
  return;
40
40
  }
41
41
 
package/identity.js CHANGED
@@ -15,7 +15,7 @@ const config = {
15
15
 
16
16
  export class Identity {
17
17
  constructor(key) {
18
- if (typeof document == 'undefined') {
18
+ if (typeof document == 'undefined' || !document.cookie) {
19
19
  return;
20
20
  }
21
21
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebuy/rebuy",
3
3
  "description": "This is the default library for Rebuy",
4
- "version": "1.3.6",
4
+ "version": "1.3.7",
5
5
  "license": "MIT",
6
6
  "author": "Rebuy, Inc.",
7
7
  "type": "module",
package/session.js CHANGED
@@ -12,7 +12,7 @@ const config = {
12
12
 
13
13
  export class Session {
14
14
  constructor() {
15
- if (typeof document == 'undefined') {
15
+ if (typeof document == 'undefined' || !document.cookie) {
16
16
  return;
17
17
  }
18
18