react-zendesk-helpcenter
Version:
React library that makes it easy to render Zendesk Help Center content in your React apps.
31 lines (28 loc) • 905 B
JavaScript
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
import _regeneratorRuntime from "@babel/runtime/regenerator";
// @todo Add error handling - Ryan
export default function fetcher() {
return _fetcher.apply(this, arguments);
}
function _fetcher() {
_fetcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
var res,
_args = arguments;
return _regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return fetch.apply(void 0, _args);
case 2:
res = _context.sent;
return _context.abrupt("return", res.json());
case 4:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return _fetcher.apply(this, arguments);
}