@eccenca/superagent
Advanced tools
Comparing version
@@ -6,2 +6,6 @@ # Change Log | ||
## [Unreleased] | ||
### Fixed | ||
- compatibility with IE11 | ||
## [1.4.0] 2018-01-23 | ||
@@ -8,0 +12,0 @@ |
@@ -372,10 +372,4 @@ module.exports = | ||
var _warning = __webpack_require__(12); | ||
var _warning2 = _interopRequireDefault(_warning); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var DEPRECATION_WARNING = '@eccenca/superagent: You used .message of to access Error details.\nYou should use the more detailed .title and .detail .'; | ||
function httpProblemHandler(callback, err, res) { | ||
@@ -427,13 +421,2 @@ | ||
_lodash2.default.set(err, 'response.type', 'application/problem+json'); | ||
err = new Proxy(err, { | ||
get: function get(t, n) { | ||
if (n === 'message') { | ||
(0, _warning2.default)(!__DEBUG__, DEPRECATION_WARNING); | ||
return t.title + '\n' + t.detail; | ||
} else { | ||
return t[n]; | ||
} | ||
} | ||
}); | ||
} | ||
@@ -455,9 +438,3 @@ | ||
/***/ }), | ||
/* 12 */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("warning"); | ||
/***/ }) | ||
/******/ ]); |
{ | ||
"name": "@eccenca/superagent", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Extended version of superagent.js, pimped with RX, better Link header parsing and HTTP Problem support", | ||
@@ -5,0 +5,0 @@ "main": "es5/component.js", |
import _ from 'lodash'; | ||
import warning from 'warning'; | ||
const DEPRECATION_WARNING = `@eccenca/superagent: You used .message of to access Error details. | ||
You should use the more detailed .title and .detail .`; | ||
function httpProblemHandler(callback, err, res) { | ||
@@ -55,14 +51,2 @@ | ||
err = new Proxy(err, { | ||
get: function(t, n) { | ||
if (n === 'message') { | ||
warning(!__DEBUG__, DEPRECATION_WARNING); | ||
return t.title + '\n' + t.detail; | ||
} | ||
else { | ||
return t[n]; | ||
} | ||
} | ||
}); | ||
} | ||
@@ -69,0 +53,0 @@ |
22418
-4.88%511
-5.72%