Sanity-check decaffeinate ajax

pull/1441/head
Simon Legner 1 year ago
parent 262a0b9d56
commit 04d167c9e0

@ -1,19 +1,9 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS205: Consider reworking code to avoid use of IIFEs
* DS207: Consider shorter variations of null checks
* DS208: Avoid top-level this
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
const MIME_TYPES = { const MIME_TYPES = {
json: "application/json", json: "application/json",
html: "text/html", html: "text/html",
}; };
this.ajax = function (options) { function ajax(options) {
applyDefaults(options); applyDefaults(options);
serializeData(options); serializeData(options);
@ -30,7 +20,7 @@ this.ajax = function (options) {
} else { } else {
return parseResponse(xhr, options); return parseResponse(xhr, options);
} }
}; }
ajax.defaults = { ajax.defaults = {
async: true, async: true,

Loading…
Cancel
Save