@steroidsjs/core 2.2.18 → 2.2.19

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.
@@ -8,6 +8,7 @@ export default class ClientStorageComponent {
8
8
  STORAGE_SESSION: any;
9
9
  localStorageAvailable: boolean;
10
10
  sessionStorageAvailable: boolean;
11
+ domain?: string;
11
12
  private _ssrCookie;
12
13
  constructor(components: any, config: any);
13
14
  /**
@@ -55,6 +55,7 @@ var ClientStorageComponent = /** @class */ (function () {
55
55
  this.sessionStorageAvailable = false;
56
56
  }
57
57
  }
58
+ this.domain = (config === null || config === void 0 ? void 0 : config.domain) || null;
58
59
  this._ssrCookie = config === null || config === void 0 ? void 0 : config.ssrCookie;
59
60
  }
60
61
  /**
@@ -122,7 +123,10 @@ var ClientStorageComponent = /** @class */ (function () {
122
123
  }
123
124
  };
124
125
  ClientStorageComponent.prototype._getDomain = function () {
125
- var host = (typeof location !== 'undefined' && location.hostname) || '';
126
+ if (this.domain) {
127
+ return this.domain;
128
+ }
129
+ var host = (typeof window.location !== 'undefined' && window.location.hostname) || '';
126
130
  return ((!/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/.test(host)
127
131
  && host
128
132
  .split('.')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/core",
3
- "version": "2.2.18",
3
+ "version": "2.2.19",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {