@docbrasil/api-systemmanager 1.1.47 → 1.1.49

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/api/dispatch.js CHANGED
@@ -12,8 +12,8 @@ class Dispatch {
12
12
 
13
13
  const self = this;
14
14
  self.parent = options.parent;
15
- self._cache = options.cache;
16
- self._forceCache = options.forceCache;
15
+ self._cache = self.parent.options.cache;
16
+ self._forceCache = self.parent.options.forceCache;
17
17
  self._client = Axios.create({baseURL: self.parent.options.uri, withCredentials: true});
18
18
 
19
19
  // Add request interceptor for offline handling
package/dist/bundle.cjs CHANGED
@@ -24,7 +24,8 @@ class Dispatch {
24
24
 
25
25
  const self = this;
26
26
  self.parent = options.parent;
27
- self._cache = options.cache;
27
+ self._cache = self.parent.options.cache;
28
+ self._forceCache = self.parent.options.forceCache;
28
29
  self._client = Axios__default["default"].create({baseURL: self.parent.options.uri, withCredentials: true});
29
30
 
30
31
  // Add request interceptor for offline handling
@@ -122,6 +123,7 @@ class Dispatch {
122
123
  * @private
123
124
  */
124
125
  _isOnline() {
126
+ if(this._forceCache) return false;
125
127
  return typeof navigator !== 'undefined' && navigator.onLine;
126
128
  }
127
129