ajax: use Object.entries

pull/1441/head
Simon Legner 1 year ago
parent a2e74712d3
commit 228090ad83

@ -59,14 +59,12 @@ var serializeData = function (options) {
}; };
var serializeParams = (params) => var serializeParams = (params) =>
(() => { Object.entries(params)
const result = []; .map(
for (var key in params) { ([key, value]) =>
var value = params[key]; `${encodeURIComponent(key)}=${encodeURIComponent(value)}`,
result.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); )
} .join("&");
return result;
})().join("&");
var applyCallbacks = function (xhr, options) { var applyCallbacks = function (xhr, options) {
if (!options.async) { if (!options.async) {

Loading…
Cancel
Save