@highpoint/js-fetch
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -0,1 +1,4 @@ | ||
# v1.1.0 | ||
* Throw exception when device is offline | ||
# v1.0.1 | ||
@@ -2,0 +5,0 @@ * Throw exception on authorization errors |
@@ -29,2 +29,6 @@ 'use strict'; | ||
var isOffline = function isOffline() { | ||
return 'onLine' in window.navigator && !window.navigator.onLine; | ||
}; | ||
var checkResponse = function () { | ||
@@ -114,2 +118,3 @@ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(response) { | ||
} | ||
if (isOffline()) throw new Error('Network Error. Are you offline?'); | ||
return fetch(url.indexOf('http') === 0 ? url : baseURI + url, _extends({ | ||
@@ -116,0 +121,0 @@ method: method, |
{ | ||
"name": "@highpoint/js-fetch", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "HighPoint Fetch Library", | ||
@@ -34,4 +34,4 @@ "main": "dist/js-fetch.js", | ||
"precommit": "lint-staged", | ||
"prepare": "run-s clean build" | ||
"prepack": "run-s clean build" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13700
233